[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Bug of freetype2 2.1.3. [patch attached]
From: |
Anthony Fok |
Subject: |
Re: [Devel] Bug of freetype2 2.1.3. [patch attached] |
Date: |
Mon, 30 Dec 2002 04:22:41 +0800 |
User-agent: |
Mutt/1.4i |
Hello all,
On Tue, Dec 24, 2002 at 10:53:01AM +0800, James Su wrote:
> Hi,
> I recently updated my freetype2 to 2.1.3, and I found that some of my
> font cannot be loaded by freetype2 anymore. ftdump just tell me "can not
> load face" and gave me a errno = 0x0002. Freetype 2.1.2 is OK. [...]
Out of curiosity, I downloaded Yzdws1.ttf and tested it, and had the same
results James had, that FreeType 2.1.2 recognized it, but not 2.1.3.
It turns out that Just (fonttools/TTX's author) has the right idea:
> From: Just van Rossum <address@hidden>
> Subject: Re: [FontTools] Bug of fonttools 2.0 beta1?
> To: James Su <address@hidden>
> cc: address@hidden
> Date: Tue, 24 Dec 2002 14:59:22 +0100
>
> James Su wrote:
>
> > Recently, I tried fonttools 2.0 beta1 with one of my CJK fonts, but it
> > failed at OS/2 table:
>
> Your OS/2 table has the wrong size: for format 1 it should be 86 bytes
> long, yours is 88. It seems like the tools that created it padded it to
> be a multiple of 4 bytes, but the data length in the header should still
> be 86. I'll change TTX to be more lenient, though.
ttload.c would goto Bad_Format if table.Length != 0x36. After padding this
number to a multiple of 4 bytes, i.e. 0x38, FreeType 2.1.3 accepts
Yzdws1.ttf. I don't know if this is the same OS/2 table that Just talked
about, but hey, it does the trick! :-)
Attached is a suggested fix to make FreeType 2.1.3 more lenient by accepting
both 0x36 and 0x38. :-)
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/
007-freetype-2.1.3-ttload-table-length.patch
Description: Text document