[Top][All Lists]
[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: |
David Turner |
Subject: |
Re: [Devel] FreeType 2.1.x rejects CMap4 of certain Dyna-Fonts [patch by akito] |
Date: |
Wed, 23 Apr 2003 15:39:33 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 |
Hello Anthony,
Anthony Fok wrote:
Dear all,
There has been a series of patches made by Akito Hirai of the Japan KDE
User's Group, and recently by Firefly in Taiwan, to improve CJK font
rendering with FreeType, fontconfig/Xft2, Qt, Pango and Mozilla.
Perhaps due to the language barrier, or perhaps due to unfamiliarity
with upstream mailing lists, these patches have not made their way
upstream yet. Anyhow, let's get started! ;-)
Excellent news :-)
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.
So, please apply the attached patch. This patch is also available
here:
http://www.kde.gr.jp/~akito/patch/freetype2/freetype-2.1.3-ttcmap4.patch
It applies cleanly to 2.1.4 too.
OK, I see no reason not to apply it to the current code, it seems simple
and clean.
David, Akito-san also worked on the autohinter to make it hint CJK
fonts well too, and released a patch last week (updated 2003-04-16).
Firefly has also verified it and find it marvellous.
Before: http://www.kde.gr.jp/~akito/patch/image/ah-slight1.png
After: http://www.kde.gr.jp/~akito/patch/image/ah-slight2.png
Patches: http://www.kde.gr.jp/~akito/patch/freetype2/2.1.4/
It would be marvellous if you could look into it. Thanks in advance!
That's impressive, but the patch is so incredibly large that we're not
going to apply it directly without carefully reading and understanding
it. After a quick look at it, it seems that the current code may have
some performance issues because it calls FT_Get_Char_Index in a very
large loop to determine wether certain Unicode ranges are supported.
There probably is a way to dramatically speed this using
"FT_Get_First_Char" and "FT_Get_Next_Char", and I'll look to it.
It also seems that this patch modifies the hinting of non-CJK fonts as
well, which means that we need to perform a lot of testing to check that
it doesn't degrade some other popular fonts...
Again, more study to be done...
Thanks a lot,
- David Turner
- The FreeType Project (www.freetype.org)
--
This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
CANAL+TECHNOLOGIES will not therefore be liable for the message if modified.