[MPlayer-users] MPlayer not loading correct font

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sat May 3 18:46:07 CEST 2008


On Saturday 03 May 2008 20:02:50 Vladimir Mosgalin wrote:
> Hi Evgeniy Stepanov!
>
>  On 2008.05.03 at 14:21:49 +0400, Evgeniy Stepanov wrote next:
> > I've added some extra debug prints, try with the latest svn and -v
> > option.
> >
> > For (Arial Narrow, 200, 0) the corresponding fc-match line would be:
> > fc-match ":family=Arial
> > Narrow:family=Arial:weight=200:slant=0:outline=1".
>
> It returns
> arialnb.ttf: "Arial Narrow" "Narrow"
>
> mplayer prints
> [ass] fontconfig: Выбранный шрифт не совпадает с запрошенным: 'Arial' !=
> 'Arial Narrow' [ass] Font info: family 'Arial', style 'Narrow', fullname
> '(null)', slant 0, weight 200 fontconfig_select: (Arial Narrow, 200, 0) ->
> /usr/share/fonts/default/TrueType/arialnb.ttf, 0
>
> Now that I look at it, it probably IS arial narrow. It's just that arial
> narrow bold isn't very "narrow" and looks closer to arial regular than
> to arial narrow, so to say (and it's even harder to spot the difference
> in vertical writing).
>
> So everything is probably OK, but
> 1) are you sure bold version was meant to be used?

Sure, the '1' right after colors.

> 2) is specifying bold font by weight is as reliable as specifying it by
>    style (considering subtitle engines other than libass)?

You mean, putting exact font weight in style description? Should be ok, it is 
specifically mentioned in specs.

Libass does not set FC_STYLE, only FC_WEIGHT. So, something like "Arial Narrow 
Bold" won't work (will select Arial Narrow Regular).

> 3) then, what was that warning about? Looks kinda misleading, too - like
>    fontconfig is choosing arial instead of arial narrow. And according
>    to fc-match the name of arialnb.ttf is "Arial Narrow", not "Arial".

Something strange happens here, probably related to the trick I'm using 
(splitting font name into words). Some pattern elements are obviously 
incorrect. I'll take a closer look.

By the way, what does fc-match -v with the same pattern looks like? The 
same 'Narrow' style?

> May I suggest the following logic - print warning only if
> "requested name" != "resulting name" &&
> "requested name" != "resulting name(space)resulting style"
> and in that case, print not "resulting name" in warning, but
> "resulting name(space)resulting style"

Already, but using full name instead of "resulting name(space)resulting 
style". They are usually the same, in your case the problem must lie 
elsewhere.



More information about the MPlayer-users mailing list