From 5a59de2b983ed7a1c639ea3e4d23c341134cd6d5 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 28 Oct 2019 14:02:47 -0700 Subject: [PATCH] Actually add +hb_font_get_nominal_glyphs() New API: +hb_font_get_nominal_glyphs() --- src/hb-font.cc | 23 +++++++++++++++++++++++ src/hb-font.h | 8 ++++++++ 2 files changed, 31 insertions(+) diff --git a/src/hb-font.cc b/src/hb-font.cc index ee35966c1..340336814 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -791,6 +791,29 @@ hb_font_get_nominal_glyph (hb_font_t *font, return font->get_nominal_glyph (unicode, glyph); } +/** + * hb_font_get_nominal_glyphs: + * @font: a font. + * + * + * + * Return value: + * + * Since: REPLACEME + **/ +unsigned int +hb_font_get_nominal_glyphs (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_unicode, + unsigned int unicode_stride, + hb_codepoint_t *first_glyph, + unsigned int glyph_stride) +{ + return font->get_nominal_glyphs (count, + first_unicode, unicode_stride, + first_glyph, glyph_stride); +} + /** * hb_font_get_variation_glyph: * @font: a font. diff --git a/src/hb-font.h b/src/hb-font.h index 677be2f93..01ff201ae 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -459,6 +459,14 @@ hb_font_get_variation_glyph (hb_font_t *font, hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph); +HB_EXTERN unsigned int +hb_font_get_nominal_glyphs (hb_font_t *font, + unsigned int count, + const hb_codepoint_t *first_unicode, + unsigned int unicode_stride, + hb_codepoint_t *first_glyph, + unsigned int glyph_stride); + HB_EXTERN hb_position_t hb_font_get_glyph_h_advance (hb_font_t *font, hb_codepoint_t glyph);