[MPlayer-users] MPlayer not loading correct font

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Sat May 3 23:45:41 CEST 2008


Hi Evgeniy Stepanov!

 On 2008.05.04 at 01:07:24 +0400, Evgeniy Stepanov wrote next:

> It might be a good idea to extract style from a font name (Can it work 
> reliably? There seems to be a lot of different styles, just check fc-list) 

Dunno, in some applications I've seen reverse mapping works incorrectly,
but it's reliable. I.e. you select 'Garamond:style=Bold', pick the font,
then check its name and suddenly it's 'Garamond:style=Negreta' (first in
the list of styles if you run "LANG=C fc-list |grep Garamond"). Anyway
most likely you'll have to guess the language for comparison, but if you
choose to stick to english ("Bold" etc) you can probably find a way to
do this. Check this out:

$ LANG=ru_RU.UTF-8 fc-list Garamond:style=Bold
Garamond:style=Полужирный,Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Fet,Kalın,Krepko,Lodia
$ LANG=C fc-list Garamond:style=Bold
Garamond:style=Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
$ LANG=en_US.UTF-8 fc-list Garamond:style=Bold
Garamond:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia


> That's funny, I have a different version of the same font:
> 
> font name entries
>    family:     Arial Narrow
>    style:      Bold
>    postscript: ArialNarrow-Bold

Most likely and old version. For example version 2.20 (file size 124.7
kb, 658 glyphs, empty description) or version 2.35 have family "Arial
Narrow", but more recent version 2.37, which comes with vista or latest
ms office (174.7 kb, 664 glyphs, dated 2006) has family "Arial". Anyway
if you're checking name and styles via fontconfig and not directly
through freetype this shouldn't make a difference, right?

-- 

Vladimir



More information about the MPlayer-users mailing list