Mercurial > mplayer.hg
diff libass/ass_render.c @ 23134:1de2a46a0987
Add -ass-hinting option for setting font hinting method.
It is possible to separately configure hinting for scaled and unscaled osd.
The default is native hinter for unscaled osd (only vo_gl at this point),
no hinting for vf_ass.
author | eugeni |
---|---|
date | Fri, 27 Apr 2007 14:25:36 +0000 |
parents | 0574817cc6cb |
children | 15a05bafc9c7 |
line wrap: on
line diff
--- a/libass/ass_render.c Fri Apr 27 14:18:44 2007 +0000 +++ b/libass/ass_render.c Fri Apr 27 14:25:36 2007 +0000 @@ -56,6 +56,7 @@ int use_margins; // 0 - place all subtitles inside original frame // 1 - use margins for placing toptitles and subtitles double aspect; // frame aspect ratio, d_width / d_height. + ass_hinting_t hinting; char* default_font; char* default_family; @@ -1249,7 +1250,7 @@ info->advance.y = val->advance.y; } else { glyph_hash_val_t v; - info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol); + info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol, global_settings->hinting); if (!info->glyph) return; info->advance.x = d16_to_d6(info->glyph->advance.x); @@ -2049,6 +2050,14 @@ } } +void ass_set_hinting(ass_renderer_t* priv, ass_hinting_t ht) +{ + if (priv->settings.hinting != ht) { + priv->settings.hinting = ht; + ass_reconfigure(priv); + } +} + int ass_set_fonts(ass_renderer_t* priv, const char* default_font, const char* default_family) { if (priv->settings.default_font)