Around 8 o'clock on Jul 22, Brian Stell wrote:
> Yes, this is important. I can well imagine an app that that saves > a user's preference. If the user changes locale then the saved > preferences should still find the user's previously set prefered > fonts. I expect this to mean that the app will save the preferences > in ascii and then get the localized list for display. Hmm. I think I see the way through here. See below. > Will there be a way to get the localized name using the ascii only name? Yes. The representation of the names internally includes all of the localized names along with the postscript name (which is always ASCII), any match or list result will include all of these names. I would sort the names so that any English or Latin names would come first in the list. Ok, so applications want a notion of 'canonical' family names which can be mapped to localized names for display to the user at runtime. I plan on storing all of these names together in the same FC_FAMILY entry for each known font, tagged (somehow) with the associated language. The entries would be sorted with English names first, followed by names containing only Latin characters and then the remaining names following sorted by language tag. A naïve application using the existing FcPatternGetString API will get an English name for each font. A separate API (FcPatternGetLangString?) would walk the list of names and select the one best matching the specified language (or current locale). An application wishing to store font preferences in a locale-insensitive fashion can either: a) Store just the English name. Converting to a local name would require a call to FcFontList and then a call to FcPatternGetLangString. b) Store all of the names along with their languages. This can be done with FcNameUnparse/FcNameParse which generate UTF-8 encoded strings for the font name. Keith Packard XFree86 Core Team HP Cambridge Research Lab _______________________________________________ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts