Mercurial > mplayer.hg
diff libass/ass_mp.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 | 71b3e04d0555 |
children | 99ac5d381aed |
line wrap: on
line diff
--- a/libass/ass_mp.c Fri Apr 27 14:18:44 2007 +0000 +++ b/libass/ass_mp.c Fri Apr 27 14:25:36 2007 +0000 @@ -50,6 +50,7 @@ char* ass_color = NULL; char* ass_border_color = NULL; char* ass_styles_file = NULL; +int ass_hinting = ASS_HINTING_NATIVE + 4; // native hinting for unscaled osd #ifdef HAVE_FONTCONFIG extern int font_fontconfig; @@ -218,11 +219,17 @@ char *get_path(char *); -void ass_configure(ass_renderer_t* priv, int w, int h) { +void ass_configure(ass_renderer_t* priv, int w, int h, int unscaled) { + int hinting; ass_set_frame_size(priv, w, h); ass_set_margins(priv, ass_top_margin, ass_bottom_margin, 0, 0); ass_set_use_margins(priv, ass_use_margins); ass_set_font_scale(priv, ass_font_scale); + if (!unscaled && (ass_hinting & 4)) + hinting = 0; + else + hinting = ass_hinting & 3; + ass_set_hinting(priv, hinting); } void ass_configure_fonts(ass_renderer_t* priv) {