freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Some PDF embedded CFF fonts loading broken


From: Werner LEMBERG
Subject: Re: [ft-devel] Some PDF embedded CFF fonts loading broken
Date: Sun, 04 Jul 2010 22:04:23 +0200 (CEST)

> 18b552f6aeb84dc6fb5f9b8a3b37e0d4414de45e broke loading of some
> embedded CFF fonts (at least when PDF in question, such as [1], is
> viewed with MuPDF derived viewer)

Embedded?  The PDF file you refer to doesn't contain a single embedded
font...

> Following "fixes" the issue for me:

> -          if ( ( ip + 3 + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
> +          if ( ( ip + 3 + (hinter ? ( ( decoder->num_hints + 7 ) >> 3 ) : 0) 
> ) > limit )

I think this is not the right fix – regardless of the hinting engine,
a CFF must not be malformed.  However, the constant `3' is probably
wrong.  Please try this line instead:

  if ( ( ip + 1 + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )


    Werner

reply via email to

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