diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-16 03:00:41 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-16 03:00:41 +0200 |
commit | ab9053174b7815d2c0b9cb7a5a726cb2e183ec4e (patch) | |
tree | dc0509badd5d20334f1529fc10f70a1501a22c03 /libass/ass_shaper.c | |
parent | fa7e99e3d8a78805e9acfb327786307d91c20104 (diff) | |
download | libass-ab9053174b7815d2c0b9cb7a5a726cb2e183ec4e.tar.bz2 libass-ab9053174b7815d2c0b9cb7a5a726cb2e183ec4e.tar.xz |
shaper: fix run-specific font size
Make sure to set the font size for every run, as needed, to get metrics
(advance/offset) for the right size.
Diffstat (limited to 'libass/ass_shaper.c')
-rw-r--r-- | libass/ass_shaper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c index 55bcaae7..9796dc55 100644 --- a/libass/ass_shaper.c +++ b/libass/ass_shaper.c @@ -158,6 +158,8 @@ static hb_font_t *get_hb_font(GlyphInfo *info) hb_fonts[info->face_index] = hb_ft_font_create(font->faces[info->face_index], NULL); + ass_face_set_size(font->faces[info->face_index], info->font_size); + return hb_fonts[info->face_index]; } @@ -307,7 +309,6 @@ void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv, // set size and get glyph index double size_scaled = ensure_font_size(render_priv, info->font_size * render_priv->font_scale); - ass_font_set_size(info->font, size_scaled); ass_font_get_index(render_priv->fontconfig_priv, info->font, info->symbol, &info->face_index, &info->glyph_index); // shape runs share the same font face and size |