freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] FreeType 2.1.x rejects CMap4 of certain Dyna-Fonts [patch by


From: Anthony Fok
Subject: Re: [Devel] FreeType 2.1.x rejects CMap4 of certain Dyna-Fonts [patch by akito]
Date: Mon, 21 Apr 2003 02:55:14 +0800
User-agent: Mutt/1.5.4i

On Sun, Apr 20, 2003 at 12:40:16PM +0400, Vadim Plessky wrote:
> 
> I have been once in Taiwan, very nice place!  Unfortunately, I have never
> been in Japan or Korea.
> I hope we can overcome language barriers and work together!..

The feeling is mutual.  However, I do have to admit that I forgot to contact
Akito before sending this message to the list.  Hope he doesn't mind.  :-)

> |  So, let's start with FreeType-2.1.4.  Due to another CMap4 bug in many
> |  Dyna CJK fonts, FreeType 2.1.x rejects their Unicode CMap, rendering
> |  these fonts unusable.  Akito-san has provided a patch to deal with
> |  buggy Dyna Japanese fonts.  Firefly and other Taiwan KDE users have
> |  verified that buggy Dyna Chinese fonts became usable with this patch.
> 
> I have a question here.
> Is it possible to import those Dyna Chinese fonts into PfaEdit, make
> necessary fixes and generate bugs-free fonts?

I think it is possible, with PfaEdit or TTX/fonttools or other good font
tools.  However, few end-users would ever do that.  They (esp. the newbies)
would only say, "But those fonts work in MS Windows!  Surely, the fonts are
okay, aren't they?  It must be a bug of Linux/FreeType!"
Besides, those are proprietary commercial fonts and aren't supposed to be
modified.

So yes, by simply making FreeType less strict on CMap validation (except
in FT_VALIDATE_TIGHT mode), we can allow slightly buggy Dyna fonts to work
too.  :-)

> > [Akito's autohinter enhancements for CJK fonts]
> Cool!
> Does it improve rendering of non-CJK fonts, too?
> Autohinter has problems with certain Cyrillic glyphs, as those glyphs are 
> more 
> complex than traditional English/Latin.
> As CJK fonts are much more complex than Cyrillic/Greek, I guess users or 
> Cyrillic/Greek alphabets would benefit from your work.

Hehe, Akito would have to answer that, as I know too little to
understand autohinting.  Nevertheless, I just did a test and saw how
important the patch is for CJK fonts.  The Hanzi/Kanji/Hanja and
norml-size Hirigana/Katagana characters are supposed to be
_fixed-width_, usually square block characters.

However, the current FreeType 2.1.4 autohinter would change the width
of the characters.  That's okay for proportional european scripts, but
a No-No for CJK characters.  Akito's patch solves this problem.  He may
has also tuned the autohinter to work well with Mincho/Ming/Song and
Gothic/Hei CJK fonts too.

To see Akito's patch at work, try "ftview 24 bsmi00lp.ttf", or any free
CJK fonts (kochi-mincho.ttf, batang.ttf, etc.).  Scroll down to the CJK
characters.  Before applying his patch, if you turn on autohinting,
you'll see that the square characters are no longer aligned in a "nice
grid", so to speak.

Another thing I noticed with the patch: Some free CJK fonts, like
Baekmuk Batang (batang.ttf), is poorly instructed.  Nonetheless, even
with good native bytecode hinting, Akito's enhanced autohinter
can sometimes hint as good as or even better than the fonts' own native
bytecode hinting.  That's significant.  :-)

Another innovation is that Akito's autohinting code still make use of
the native TrueType bytecode instruction if necessary, e.g. with stroke
composition with DynaLab MingLiU font.  In the past, for end-users, 
turning on autohinter means that MingLiU is unusable.  (Hehe, I think
it would work well with Graham's unpatented bytecode interpreter code. 
:-)

Note, however, that Akito mentions about a slight speed penalty.  I
don't know how significant it is though.  He did mention that he
couldn't notice the difference on a Celeron 1GHz.  :-)

That's all I know for now.  :-)  Cheers,

Anthony

-- 
Anthony Fok Tung-Ling
ThizLinux Laboratory   <address@hidden> http://www.thizlinux.com/
Debian Chinese Project <address@hidden>       http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp!           http://www.olvc.ab.ca/



reply via email to

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