[Fontconfig] confused about <alias> <prefer>

Keith Packard keithp at keithp.com
Thu Feb 27 08:48:16 EST 2003


Around 21 o'clock on Feb 26, Alan Chandler wrote:

> Yes - I full understand the use of weak binding for the generic names

The generic names are often provided by the application and end up (by 
default) with strong binding.  Perhaps the problem here is an application 
using the "generic" name 'fixed' which in fact matches actual fonts.  The 
proper generic name is 'monospace', which won't match any fonts.

It's the substitutions in the config file which are weak by default.  The 
intent is to ensure that:

	Times(s),Serif(s)	-> Times(s),Times New Roman(w),Serif(s)

Language is relevant here.  My copy of Times doesn't have cyrillic 
letters, so if an application used this pattern for a russian document,
if the Times New Roman was bound strong, it would match better than Times 
did.  However, when an application explicitly specifies a family name, 
with a strong binding, that overrides the language so that the application 
opens the named font instead of one which supports the language.

> If there is strong binding alias family name my proposal is that the prefer 
> would prepend as strong.  At the moment it prepends as weak, and so the 
> matching mechanism effectively ignores this prepending.  This was the problem 
> I was having.

The generic names aren't supposed to matter as there aren't supposed to be 
fonts with those names present in the system.  Strong aliases should serve 
only to override real fonts with others, and that must not be part of the 
default configuration as that makes it impossible for applications to ever 
open the overridden fonts.

I guess I'm still confused over what the actual problem is here.

-keith






More information about the Fontconfig mailing list