Add hb_font_get_*

This commit is contained in:
Behdad Esfahbod 2009-11-05 13:55:41 -05:00
parent 9bef3611f0
commit 2e33669291
3 changed files with 54 additions and 1 deletions

View File

@ -170,6 +170,41 @@ hb_font_funcs_set_kerning_func (hb_font_funcs_t *ffuncs,
}
hb_codepoint_t
hb_font_get_glyph (hb_font_t *font, hb_face_t *face,
hb_codepoint_t unicode, hb_codepoint_t variation_selector)
{
return font->klass->get_glyph (font, face, font->user_data,
unicode, variation_selector);
}
hb_bool_t
hb_font_get_contour_point (hb_font_t *font, hb_face_t *face,
unsigned int point_index,
hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
{
return font->klass->get_contour_point (font, face, font->user_data,
point_index,
glyph, x, y);
}
void
hb_font_get_glyph_metrics (hb_font_t *font, hb_face_t *face,
hb_codepoint_t glyph, hb_glyph_metrics_t *metrics)
{
/* TODO Zero metrics here? */
return font->klass->get_glyph_metrics (font, face, font->user_data,
glyph, metrics);
}
hb_position_t
hb_font_get_kerning (hb_font_t *font, hb_face_t *face,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph)
{
return font->klass->get_kerning (font, face, font->user_data,
first_glyph, second_glyph);
}
/*
* hb_face_t
*/

View File

@ -130,6 +130,24 @@ hb_font_funcs_set_kerning_func (hb_font_funcs_t *ffuncs,
hb_font_get_kerning_func_t kerning_func);
hb_codepoint_t
hb_font_get_glyph (hb_font_t *font, hb_face_t *face,
hb_codepoint_t unicode, hb_codepoint_t variation_selector);
hb_bool_t
hb_font_get_contour_point (hb_font_t *font, hb_face_t *face,
unsigned int point_index,
hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y);
void
hb_font_get_glyph_metrics (hb_font_t *font, hb_face_t *face,
hb_codepoint_t glyph, hb_glyph_metrics_t *metrics);
hb_position_t
hb_font_get_kerning (hb_font_t *font, hb_face_t *face,
hb_codepoint_t first_glyph, hb_codepoint_t second_glyph);
/*
* hb_font_t
*/

View File

@ -70,7 +70,7 @@ hb_shape (hb_font_t *font,
/* natural direction analysis */
/* OT preprocess */
map_glyphs (face, font, buffer);
map_glyphs (font, face, buffer);
/* GSUB */
/* Default positioning */