[MPlayer-dev-eng] [PATCH] libass: treat -font as Fontconfig pattern
Adrian Stutz
adrian at sttz.ch
Sun Mar 8 16:26:39 CET 2009
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.
Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libass_name_as_pattern.patch
Type: application/octet-stream
Size: 10600 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090308/1ffc973b/attachment.obj>
More information about the MPlayer-dev-eng
mailing list