[Fontconfig] how to enforce scalable fonts
Werner LEMBERG
wl at gnu.org
Sun Jan 23 13:48:08 PST 2011
> Welcome to the mess that is fontconfig! :)
:-) Honestly, FontConfig seems to work quite nice, but it lacks
someone who is taking care of, for example, by improving the
documentation or adding features.
>> It seems that FontConfig doesn't provide a function which only returns
>> the list of fonts which *exactly* match the pattern. Any reason for
>> this? Or am I missing something?
>
> Well, it's not that clear cut. For example, you may ask for Times
> New Roman, and fontconfig will give you Liberation Serif, or Nimbus
> Roman No9, or Tinos, and they are all real substitutes for Times New
> Roman.
Well, I consider FontConfig as *the* interface to the fonts of an
operating system, and there are situations where a substitution is
simply the wrong action. I would prefer if there were functions which
returned an empty list in case the match isn't exact, say.
>> UTRG____.pfa: "Utopia" "Regular"
>> putr.pfa: "Utopia" "Regular"
>> UTB_____.pfa: "Utopia" "Bold"
>> putb.pfa: "Utopia" "Bold"
>> UTI_____.pfa: "Utopia" "Italic"
>> putri.pfa: "Utopia" "Italic"
>> UTBI____.pfa: "Utopia" "Bold Italic"
>> putbi.pfa: "Utopia" "Bold Italic"
>> UTRG__12-ISO8859-1.pcf.gz: "Utopia" "Regular"
>> UTRG__12.pcf.gz: "Utopia" "Regular"
>> UTB___12-ISO8859-1.pcf.gz: "Utopia" "Bold"
>> UTB___12.pcf.gz: "Utopia" "Bold"
>> ...
>>
>> I wonder how this can be called `sorted'... Why has putb.pfa
>> (having a different font series value) a higher priority than
>> UTRG__12-ISO8859-1.pcf.gz?
>
> Most probably because UTRG__12-ISO8859-1.pcf.gz has a limited
> charset, which in the minds of fontconfig is inadequate for your
> language of choice (en_US?).
Maybe. However, then the documentation is not correct or imcomplete
since the result is simply surprising, and this is always a bad
sign...
Werner
More information about the Fontconfig
mailing list