Move code around
This commit is contained in:
parent
63635c763d
commit
a7b32f2057
|
@ -296,17 +296,17 @@ struct hb_font_t {
|
||||||
|
|
||||||
/* A bit higher-level, and with fallback */
|
/* A bit higher-level, and with fallback */
|
||||||
|
|
||||||
inline void get_extents_for_direction (hb_direction_t direction,
|
inline void get_h_extents_with_fallback (hb_font_extents_t *extents)
|
||||||
hb_font_extents_t *extents)
|
|
||||||
{
|
{
|
||||||
if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
|
|
||||||
if (!get_font_h_extents (extents))
|
if (!get_font_h_extents (extents))
|
||||||
{
|
{
|
||||||
extents->ascender = y_scale * .8;
|
extents->ascender = y_scale * .8;
|
||||||
extents->descender = extents->ascender - y_scale;
|
extents->descender = extents->ascender - y_scale;
|
||||||
extents->line_gap = 0;
|
extents->line_gap = 0;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
inline void get_v_extents_with_fallback (hb_font_extents_t *extents)
|
||||||
|
{
|
||||||
if (!get_font_v_extents (extents))
|
if (!get_font_v_extents (extents))
|
||||||
{
|
{
|
||||||
extents->ascender = x_scale / 2;
|
extents->ascender = x_scale / 2;
|
||||||
|
@ -314,6 +314,14 @@ struct hb_font_t {
|
||||||
extents->line_gap = 0;
|
extents->line_gap = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void get_extents_for_direction (hb_direction_t direction,
|
||||||
|
hb_font_extents_t *extents)
|
||||||
|
{
|
||||||
|
if (likely (HB_DIRECTION_IS_HORIZONTAL (direction)))
|
||||||
|
get_h_extents_with_fallback (extents);
|
||||||
|
else
|
||||||
|
get_v_extents_with_fallback (extents);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void get_glyph_advance_for_direction (hb_codepoint_t glyph,
|
inline void get_glyph_advance_for_direction (hb_codepoint_t glyph,
|
||||||
|
|
Loading…
Reference in New Issue