[MPlayer-dev-eng] [PATCH] libass: treat -font as Fontconfig pattern

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sun Mar 8 17:15:39 CET 2009


On Sunday 08 March 2009 18:26:39 Adrian Stutz wrote:
> On Tue, Jan 6, 2009 at 5:58 PM, Evgeniy Stepanov
>
> <eugeni.stepanov at gmail.com>wrote:
> > If you want to pass fontconfig patterns to libass, you should
> > - add a field in ass_style_t (either a char* FontPattern, or a boolean
> > treat_font_name_as_pattern)
> > - set it from ass_mp.c, where plaintext subs are converted to ass_track_t
> > - pass it to fontconfig_select as an additional function parameter
>
> Ok, here's the patch.
> This allows selecting a specific style of a font and makes the -font option
> treated the same in libass as in the osd, where it's already used as a
> pattern. The patch also updates the manpage to make this clear.
>
> It adds a treat_name_as_pattern boolean to all places needed to pass it
> from ass_mp to ass_fontconfig, where it is checked and the pattern created
> accordingly.
>
> I've tested the patch with ass/srt subtitles as well as mkvs with embedded
> fonts and everything seems to work fine.

Applied. I've also updated ass_font_desc_t comparison function in the cache.




More information about the MPlayer-dev-eng mailing list