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

Use horizontal ascent as fallback vertical origin

上级 a7b32f20
...@@ -337,14 +337,15 @@ struct hb_font_t { ...@@ -337,14 +337,15 @@ struct hb_font_t {
} }
} }
/* Internal only */
inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph, inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y) hb_position_t *x, hb_position_t *y)
{ {
*x = get_glyph_h_advance (glyph) / 2; *x = get_glyph_h_advance (glyph) / 2;
/* TODO use font_extents.ascender */ /* TODO cache this somehow?! */
*y = y_scale; hb_font_extents_t extents;
get_h_extents_with_fallback (&extents);
*y = extents.ascender;
} }
inline void get_glyph_h_origin_with_fallback (hb_codepoint_t glyph, inline void get_glyph_h_origin_with_fallback (hb_codepoint_t glyph,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册