[ot-font] Fix emboldening CFF

This commit is contained in:
Behdad Esfahbod 2023-02-01 17:06:15 -07:00
parent 6b3fe8ac1b
commit 36dcc9a432
1 changed files with 7 additions and 5 deletions

View File

@ -467,6 +467,7 @@ hb_ot_draw_glyph (hb_font_t *font,
hb_outline_t outline;
auto *pen = hb_outline_recording_pen_get_funcs ();
{ // Need draw_session to be destructed before emboldening.
hb_draw_session_t draw_session (pen, &outline, font->slant_xy);
if (!font->face->table.glyf->get_path (font, glyph, draw_session))
#ifndef HB_NO_CFF
@ -474,6 +475,7 @@ hb_ot_draw_glyph (hb_font_t *font,
if (!font->face->table.cff2->get_path (font, glyph, draw_session))
#endif
{}
}
outline.embolden (font->x_shift, font->y_shift);
outline.replay (draw_funcs, draw_data);