diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-04-27 14:25:36 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-04-27 14:25:36 +0000 |
commit | c67220c86fa6267d8e0aa5b69d0eebbe17e0ede2 (patch) | |
tree | b8e7d650db0b09986770f59af665319b048f38e7 /libass/ass_render.c | |
parent | 13156cd7946705c89ad04edba05c6434d1675e46 (diff) | |
download | mpv-c67220c86fa6267d8e0aa5b69d0eebbe17e0ede2.tar.bz2 mpv-c67220c86fa6267d8e0aa5b69d0eebbe17e0ede2.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23152 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r-- | libass/ass_render.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index f69c0c9518..da4d98ae9e 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -56,6 +56,7 @@ typedef struct ass_settings_s { 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 @@ static void get_outline_glyph(int symbol, glyph_info_t* info, FT_Vector* advance 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_font_scale(ass_renderer_t* priv, double font_scale) } } +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) |