discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Font fallback mechanism


From: Fred Kiefer
Subject: Re: Font fallback mechanism
Date: Sat, 17 Aug 2002 16:14:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204

I would like to suggest a fallback font mechanism in GNUstep.
 Right now, user can specify the font they want to use
 in .GNUstepDefault, and only one font can be specified.
 But one font can't contain all the characters from English to Chinese.
 As far as I know, WindowMaker and GTK use a fall-back mechanism
 to solve this problem.
 User can specify more than one font in the setting,
 like NSFont = (Times, MingTi);
 The program will try to use the first specified font,
 and if the first specified font doesn't support the encoding,
 it will try to use the second specified font, and so on.
 That's the easy way to display multiple language at the same time,
and I guess the easy way to implement in GNUstep.

I appreciate the idea behind this, we really need a better support for different scripts in GNUstep. What I doubt is, if the way you suggest to solve this would be possible to implement and if so, if it would help at all.

OpenStep has its own solution for the problem, but currently GNUstep does not implement it: Here the method fixFontAttributeInRange: on NSAttributedString is used to redefine the used font to one that offers the needed characters. So the easiest way to achive what you suggest, would be to implement this method. The order in which fonts are checked for the replacement would be defined by the preferredFontNames of NSFont, perhaps this would be the place where your font list could be used. I don't know how MacOSX handles this, as the fix... methods seem to be gone there.

Cheers
Fred








reply via email to

[Prev in Thread] Current Thread [Next in Thread]