freetype-devel
[Top][All Lists]
Advanced

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

[Devel] ttcmap0.c (CMap4) and ftbench.c fixes for FreeType 2.1.3


From: Anthony Fok
Subject: [Devel] ttcmap0.c (CMap4) and ftbench.c fixes for FreeType 2.1.3
Date: Tue, 24 Sep 2002 18:25:05 +0800
User-agent: Mutt/1.4i

Hello,

As discussed earlier on this list, there are a few popular fonts (e.g.
opens___.ttf that comes with OpenOffice.org) that contains:

        end=0xFFFF, start=0xFFFF, delta=0x0001, offset=0xFFFF

as the final entry in their Format 4 CMap tables.  Thanks to Werner and
George for tracking down the problem.  A revised patch is now available
to deal with this in tt_cmap4_{validate,char_index,char_next}() in
ttcmap0.c.

The second patch prevents ftbench from writing outside of calloc'ed space.
The number of codepoints obtained from reading the CMap of some fonts
may exceed face->num_glyphs.  This patch prevents ftbench from segfaulting
with opens___.ttf.  You may prefer to calloc a larger space, perhaps by
using realloc or by running through the loop once to calculate the number of
codepoints first.  It is up to you to decide.  :-)

Please let me know if these patches are fit for inclusion in FreeType 2.1.3.
(BTW, despite their filenames, these patches were made with the latest CVS,
not with 2.1.2.)

Best regards,

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/

Attachment: freetype-2.1.2-cmap4.patch
Description: Text document

Attachment: freetype-2.1.2-ftbench.patch
Description: Text document


reply via email to

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