[MPlayer-dev-eng] [PATCH] Fontconfig -font support for font_face selection

Adrian Stutz adrian at sttz.ch
Sat Dec 6 00:03:52 CET 2008


Hello,

When using Fontconfig and passing a pattern using -font, it's possible to
select a font as well as a style. If the font styles are in one file
however, the style selection gets lost because MPlayer only passes the
filename to FreeType and selects the first face in the file.

This patch gets the face index from Fontconfig and passes it along to
Freetype to ensure the correct style is chosen.

To reproduce, try to select a suitcase font style, like Palatino:
mplayer -fontconfig -font "Palatino"
mplayer -fontconfig -font "Palatino:Bold"
mplayer -fontconfig -font "Palatino:style=Italic"
all three display Palatino Bold Italic instead of Regular, Bold and Italic.
With the patch, the correct style is selected.

Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fc_font_face.patch
Type: application/octet-stream
Size: 2490 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081206/098cc268/attachment.obj>


More information about the MPlayer-dev-eng mailing list