[Top][All Lists]

[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: Thu, 29 Aug 2002 12:18:15 -0400

From: Alexander Malmberg <address@hidden>
To: address@hidden
Subject: Re: Font fallback mechanism
Date: Wed, 28 Aug 2002 23:42:25 +0200

>   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.

The encoding doesn't really help here; what's interesting is what
'scripts' a font contains glyphs for. Fonts could be made to carry this
information (iirc, many ttf fonts already do, and in back-art I could
handle the rest using fields in .nfont packages), if there were methods
in NSFont or GSFontInfo for this. I believe Pango works something like
this, and OSX probably does, too (although I couldn't find anything
really script-related in their NSFont docs).

- Alexander Malmberg

Yes, we need a method to know which glyphs is in which font.
The easy way I know (open office does) is simply look at
the string, and pick up the glyphs which belong to
CJK (Chinese, Japanese, Korean) in Unicode,
which is from 2E80-9FAF, F900-FAFF, ...
and use specified CJK fonts to display them.
It may be easy to implement, but will cause many problems I can see.
A better way is that NSStringDrawing can ask NSFont what glyphs is in it,
then choose the right one.
Maybe we need some extra private method in NSFont.
Or when the first specified NSFont can't display some glyphs,
it will automatically pick up the preferredFont and check
the glyphs, then display them.
The responsibility of picking up correct font falls on NSFont
(and backend) in the latter situation.


Join the worldÂ’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

reply via email to

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