[embolden] Update glyph_extents in hb-ot-font
This commit is contained in:
parent
aef002e0d9
commit
560a65e456
|
@ -208,6 +208,21 @@ struct hb_font_t
|
|||
extents->width = ceilf (x2) - extents->x_bearing;
|
||||
extents->height = ceilf (y2) - extents->y_bearing;
|
||||
|
||||
if (x_strength || y_strength)
|
||||
{
|
||||
/* Y */
|
||||
int y_shift = y_strength;
|
||||
if (y_scale < 0) y_shift = -y_shift;
|
||||
extents->y_bearing += y_shift;
|
||||
extents->height -= y_shift;
|
||||
|
||||
/* X */
|
||||
int x_shift = x_strength;
|
||||
if (x_scale < 0) x_shift = -x_shift;
|
||||
if (embolden_in_place)
|
||||
extents->x_bearing -= x_shift / 2;
|
||||
extents->width += x_shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue