[Fontconfig] alternate names [was: Two missing features]
otaylor at redhat.com
Sat Oct 18 01:26:28 EST 2003
On Thu, 2003-10-16 at 13:39, Keith Packard wrote:
> > We also need an API to get a font by another name; scanning all fonts
> > and building a database of all alternate names is of course
> > prohibitive. I suggest having two variants of the font listing
> > interface, one that only considers primary names, one that uses all of
> > the names.
> If we place all of the names in the FC_FAMILY entry, then the existing
> listing code will work correctly as-is. The only question is what values
> are returned by FcFontList. I think it would be nice if it returned
> localized names by default, but I can see arguments for having it always
> return names that can be represented in ASCII (or Latin-1).
I think FC_FAMILY should be restricted to being the ASCII-only name
as currently, and if you want a all-localized-font names, that should
be a separate property.
Users of fontconfig have to stay aware of the distinction between:
- Programmatic name of font
- Name of font displayed to the user
Or they won't behave properly when the user switches languages and
Certainly, the two following need to stay true:
1) FcPatternGetString (pattern, FC_FAMILY, 0, &s) must return the
2) Passing the programmatic name to FcFontSetList as FC_FAMILY
must continue to match that font
But I think even adding the localized names to FC_FAMILY in some
way that preserves those two invariants is likely to cause
breakage for existing programs.
More information about the Fontconfig