freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] BUGREPORT: ATARI-PureC-Compiler with FT_SIZEOF_INT=2


From: David Turner
Subject: Re: [Devel] BUGREPORT: ATARI-PureC-Compiler with FT_SIZEOF_INT=2
Date: Sat, 23 Nov 2002 17:42:59 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826

Hello,

PORTHOS wrote:
Hallo,

puh! I found the bugs that made CFF-Fonts not work! But this has
nothing to do with my compiler -
this code does only work if the CFF-Font is "full" with 256 glyphs!!!!
So it must be changed:

Cffload.c
==================

/* Make sure j is not too big. */
/* if ( (FT_UInt) glyph_code < num_glyphs ) */   <-- this makes it not sure 
(but stops all action)
if ( j < num_glyphs )                            <--but this of course!

Thanks for spotting this, I am currently reviewing the CFF loader, and it
seems that this line was indeed a bug !


Cffcmap.c
==================

/* if ( char_code < cmap->count ) */             <-- this is wrong
if ( char_code < 256 )                           <-- I am not sure if this is 
always right
result = cmap->gids[char_code];

By definition, cmap->count is equal to encoding->count which itself
should always be <= 256. I have just checked the code, and there were
some cases where this limit could be exceed (in the case of malformed
CFF fonts). I have fixed that and commited it to the CVS.

Let me know if this fixes your problems.

Please heave a look if there are similar bugs in the two files!


Thanks,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

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