discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Font fallback mechanism


From: Yen-Ju Chen
Subject: Re: Font fallback mechanism
Date: Wed, 28 Aug 2002 15:57:06 -0400



From: Adam Fedor <fedor@doc.com>
To: Yen-Ju Chen <yjchenx@hotmail.com>
CC: discuss-gnustep@gnu.org
Subject: Re: Font fallback mechanism
Date: Thu, 22 Aug 2002 08:29:37 -0600

Yen-Ju Chen wrote:

 Here is what I thought:
 There are two situations which font fallback will be useful.
 The simple one is that every NSString contain only one kind of script,
but the whole application (or different applications) contain different script.
 The other one is that every NSString might contain more than one script.

 For the first situation, since preferredFontNames is a class methods,
maybe user can add a NSPrefferedFont = (Times, MingTi); in .GNUstepDefaults.
 Then in drawRun: of NSStringDrawing, it will try to use
 the specified font (NSFont, NSUserFont, ...) to convert
 the encoding strictly (using GSUniStrict flag instead).
If it won't work, it will try every preferredFontName with GSUniStrict flag. If all of them won't work, it will go back to use the specified font again
 without GSUniStrict as what it does right now.
 This should be easy to implement but involve several classes.
 As long as the list of preferredFont is short
 and the majority of strings are the same script,
 it should work efficiently.

This sounds fine with me, if you'd like to try to implement it (at least the first situation for now, which sounds easier).


 After the first try, I found it is impossible for now.
 For example, if both the english font and Chinese font are iso10646-1,
 when GNUstep read a Chinese string in iso10646-1,
 it will think the english font is also iso10646-1,
 and use this english font to display this Chinese string.
 The encoding is right, but the english font
 doesn't contain these Chinese script.

 The only way I know is to really look at each font,
 and find out what script it supports.
 So even all the fonts are iso10646-1,
 some support only from 1-256, some from 1-65536, etc.
 I remember Unicode defines which segment is for which language.
 I need to check it out.
 And it will take more work than I thought.

I was wondering if you would also like to write some (short) documentation on how a user can set up GNUstep for multiple languages (and perhaps how a developer can program for it)? It would be good for me since I don't know much about it. Thanks

 Here is the first draft:
 http://www.people.virginia.edu/~yc2w/GNUstep/english/chinese.html
 This is from what I remembered.
 I need to check each step again,
 but generally it works.

 Yen-Ju


--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/discuss-gnustep




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com





reply via email to

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