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: malc
Subject: Re: [ft-devel] Some PDF embedded CFF fonts loading broken
Date: Mon, 5 Jul 2010 01:35:21 +0400 (MSD)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Sun, 4 Jul 2010, Werner LEMBERG wrote:

> 
> > 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...

Yes you are right, sorry, this PDF however includes some of fonts that
are not, to the best of my knowledge, part of mandatory PDF fonts and
so MuPDF subsitutes them with one one of URW fonts (URW fonts MuPDF
ships with were converted to CFF) 

> 
> > 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 )

Yes that works.. (FWIW the "ip + 3..." is exactly limit in this case)

-- 
mailto:address@hidden



reply via email to

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