Index: third_party/harfbuzz-ng/src/hb-font.h |
diff --git a/third_party/harfbuzz-ng/src/hb-font.h b/third_party/harfbuzz-ng/src/hb-font.h |
index 8a9dda593a90d11621d495cc7fb18bb6cde97f3c..b98759b39b4afd2ac6c2056deb5e848d9a0ab8aa 100644 |
--- a/third_party/harfbuzz-ng/src/hb-font.h |
+++ b/third_party/harfbuzz-ng/src/hb-font.h |
@@ -24,6 +24,10 @@ |
* Red Hat Author(s): Behdad Esfahbod |
*/ |
+#ifndef HB_H_IN |
+#error "Include <hb.h> instead." |
+#endif |
+ |
#ifndef HB_FONT_H |
#define HB_FONT_H |
@@ -188,6 +192,16 @@ typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, vo |
void *user_data); |
+typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, |
+ hb_codepoint_t glyph, |
+ char *name, unsigned int size, |
+ void *user_data); |
+typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, |
+ const char *name, int len, /* -1 means nul-terminated */ |
+ hb_codepoint_t *glyph, |
+ void *user_data); |
+ |
+ |
/* func setters */ |
void |
@@ -231,6 +245,15 @@ hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, |
hb_font_get_glyph_contour_point_func_t func, |
void *user_data, hb_destroy_func_t destroy); |
+void |
+hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, |
+ hb_font_get_glyph_name_func_t glyph_func, |
+ void *user_data, hb_destroy_func_t destroy); |
+void |
+hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, |
+ hb_font_get_glyph_from_name_func_t glyph_func, |
+ void *user_data, hb_destroy_func_t destroy); |
+ |
/* func dispatch */ |
@@ -272,6 +295,15 @@ hb_font_get_glyph_contour_point (hb_font_t *font, |
hb_codepoint_t glyph, unsigned int point_index, |
hb_position_t *x, hb_position_t *y); |
+hb_bool_t |
+hb_font_get_glyph_name (hb_font_t *font, |
+ hb_codepoint_t glyph, |
+ char *name, unsigned int size); |
+hb_bool_t |
+hb_font_get_glyph_from_name (hb_font_t *font, |
+ const char *name, int len, /* -1 means nul-terminated */ |
+ hb_codepoint_t *glyph); |
+ |
/* high-level funcs, with fallback */ |