hb_position_t *x HB_UNUSED,
hb_position_t *y HB_UNUSED,
const void *user_data HB_UNUSED)
-{ return false; }
+{
+ if (font->parent)
+ return hb_font_get_contour_point (font->parent,
+ point_index, glyph,
+ x, y);
+
+ *x = *y = 0;
+
+ return false;
+}
static void
hb_font_get_glyph_advance_nil (hb_font_t *font HB_UNUSED,
hb_position_t *x_advance HB_UNUSED,
hb_position_t *y_advance HB_UNUSED,
const void *user_data HB_UNUSED)
-{ }
+{
+ if (font->parent) {
+ hb_font_get_glyph_advance (font->parent, glyph, x_advance, y_advance);
+ return;
+ }
+
+ *x_advance = *y_advance = 0;
+}
static void
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t glyph HB_UNUSED,
hb_glyph_extents_t *extents HB_UNUSED,
const void *user_data HB_UNUSED)
-{ }
+{
+ if (font->parent) {
+ hb_font_get_glyph_extents (font->parent, glyph, extents);
+ return;
+ }
+
+ extents->x_bearing = extents->y_bearing = 0;
+ extents->width = extents->height = 0;
+}
static hb_codepoint_t
hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t unicode HB_UNUSED,
hb_codepoint_t variation_selector HB_UNUSED,
const void *user_data HB_UNUSED)
-{ return 0; }
+{
+ if (font->parent)
+ return hb_font_get_glyph (font->parent, unicode, variation_selector);
+
+ return 0;
+}
static hb_position_t
hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t first_glyph HB_UNUSED,
hb_codepoint_t second_glyph HB_UNUSED,
const void *user_data HB_UNUSED)
-{ return 0; }
+{
+ if (font->parent)
+ return hb_font_get_kerning (font->parent, first_glyph, second_glyph);
+
+ return 0;
+}
static hb_font_funcs_t _hb_font_funcs_nil = {
hb_position_t height;
} hb_glyph_extents_t;
-typedef hb_codepoint_t (*hb_font_get_glyph_func_t) (hb_font_t *font, const void *font_data,
- hb_codepoint_t unicode, hb_codepoint_t variation_selector,
- const void *user_data);
+
+typedef hb_bool_t (*hb_font_get_contour_point_func_t) (hb_font_t *font, const void *font_data,
+ unsigned int point_index, hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y,
+ const void *user_data);
typedef void (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, const void *font_data,
hb_codepoint_t glyph,
hb_position_t *x_advance, hb_position_t *y_advance,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents,
const void *user_data);
-typedef hb_bool_t (*hb_font_get_contour_point_func_t) (hb_font_t *font, const void *font_data,
- unsigned int point_index, hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y,
- const void *user_data);
+typedef hb_codepoint_t (*hb_font_get_glyph_func_t) (hb_font_t *font, const void *font_data,
+ hb_codepoint_t unicode, hb_codepoint_t variation_selector,
+ const void *user_data);
typedef hb_position_t (*hb_font_get_kerning_func_t) (hb_font_t *font, const void *font_data,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
const void *user_data);
void
-hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
- hb_font_get_glyph_func_t glyph_func,
- void *user_data, hb_destroy_func_t destroy);
+hb_font_funcs_set_contour_point_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_contour_point_func_t contour_point_func,
+ void *user_data, hb_destroy_func_t destroy);
void
hb_font_funcs_set_glyph_advance_func (hb_font_funcs_t *ffuncs,
void *user_data, hb_destroy_func_t destroy);
void
-hb_font_funcs_set_contour_point_func (hb_font_funcs_t *ffuncs,
- hb_font_get_contour_point_func_t contour_point_func,
- void *user_data, hb_destroy_func_t destroy);
+hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
+ hb_font_get_glyph_func_t glyph_func,
+ void *user_data, hb_destroy_func_t destroy);
void
hb_font_funcs_set_kerning_func (hb_font_funcs_t *ffuncs,
void *user_data, hb_destroy_func_t destroy);
-hb_codepoint_t
-hb_font_get_glyph (hb_font_t *font,
- hb_codepoint_t unicode, hb_codepoint_t variation_selector);
+hb_bool_t
+hb_font_get_contour_point (hb_font_t *font,
+ unsigned int point_index, hb_codepoint_t glyph,
+ hb_position_t *x, hb_position_t *y);
void
hb_font_get_glyph_advance (hb_font_t *font,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents);
-hb_bool_t
-hb_font_get_contour_point (hb_font_t *font,
- unsigned int point_index, hb_codepoint_t glyph,
- hb_position_t *x, hb_position_t *y);
+hb_codepoint_t
+hb_font_get_glyph (hb_font_t *font,
+ hb_codepoint_t unicode, hb_codepoint_t variation_selector);
hb_position_t
hb_font_get_kerning (hb_font_t *font,