提交 2e336692 编写于 作者: B Behdad Esfahbod

Add hb_font_get_*

上级 9bef3611
......@@ -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
*/
......
......@@ -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
*/
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册