Re: Unix Font Manager


Subject: Re: Unix Font Manager
From: ha shao (hashao@chinese.com)
Date: Sun Mar 04 2001 - 22:04:10 CST


On Sun, Mar 04, 2001 at 09:17:30PM -0000, tomas@frydrych.uklinux.net wrote:
> The TextRun is internally unicode, so that it is, and I think should
> remain, ignorant of any font-design issues (which is what this is
> really about), and the associated encoding problems; we will
> though need to implement a language attribute one day because of
> the spellcheker.
>

Well, language attribute is font related too. In unicode, ideograph
of Chinese, Japanese, Korean (so called 'unihan') are mapped to the same
code points. But the actually shape of some glyphs are subtly different
among the 3 languages although they looked similar.
And the shapes in the other languages are considered wrong for any CJK
users. So basically, when you switch to a new language, you have to
switch font that is actually for the language. I guess there might be
similar problem for languages other than CJK.

I would think when locale is added to text run, abiword should check
for the locale and then draw text with the suitable locale using
fontset. Fontset is the framework provided by X to deal with i18n
issues. The problem with fontset is thread safty. The non thread
safe nature of fontset drawing routine were discussed in X's i18n
mailing list a while ago. Some people proposed to add locale parameter
to fotnset drawing routines.

well... pango bypassed fontset, maybe we can take advantage of
pango in the future.

> character in question. I have met the gtk fontsets only briefly while
> working on the utf-8 stuff, but came under the impression that
> moving from fonts to fontsets would require quite a bit of work.

CJK text drawing in abiword use fontset, so I don't know how much
work it is to add this to 8bit encoded text. For gtk, you just
load_fontset instead of load_font, gtk will handle the rest.
>
> The other way is using unicode (16-bit) fonts which is already in
> place for locales that use utf-8 encoding. This is much cleaner

As said above, there are no unicode font that has all the CJK glyphs
with different shapes but the same codepoint yet. OpenType can solve
this problem but it will be even bigger than average unicode fonts.
Currently available unicode font can only be a base for rough
approximation. When it come to wp, font has to be choosen based on
the language.

-- 
Best regard
hashao



This archive was generated by hypermail 2b25 : Sun Mar 04 2001 - 22:04:56 CST