Re: Font priorities



Around 21 o'clock on Feb 4, Owen Taylor wrote:

> The thing is, fontconfig, when deciding between Raghindi and
> FreeSans for Hindi, says: FreeSans covers the current language, 
> English, and Raghindi doesn't, lets' use FreeSans, even though
> Raghindi is part of the Sans alias, and FreeSans isn't.

Fontconfig uses language to order font preferences; there's no other sane 
way to choose between two otherwise similar fonts.  If Raghindi doesn't 
support $LANG, then your application better let fontconfig know what 
language you are interested in.

> I've been somewhat unable to convince Keith there actually is
> a problem here, though I consider this a fairly major flaw
> of the fontconfig scheme.

I think one issue here is only that pango wants OT tables and Fontconfig 
doesn't provide a mechanism for selecting fonts based on that support.  We
could easily add that.

Fontconfig chooses fonts in the following order:

	Strong binding matches
	Language matches
	Weak binding matches

"normal" substitutions in the config file generate weak bindings, normal 
application APIs generate strong bindings.  This is intended to have 
application (or user) specified fonts override language specifications
while substitions found in the config file would not.  Otherwise, the 
config file rules would end up selecting fonts inappropriate for a 
particular language.

Is there some reason the document (or toolkit) can't specify an 
appropriate language here?

Keith Packard        Cambridge Research Lab	Hewlett Packard





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]