freetype-devel
[Top][All Lists]
Advanced

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

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


From: malc
Subject: [ft-devel] Some PDF embedded CFF fonts loading broken
Date: Sun, 4 Jul 2010 17:50:02 +0400 (MSD)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Hello,

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

Following "fixes" the issue for me:

diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index f81b2f4..4335b23 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -1344,7 +1344,7 @@
           /* operator and one for `endchar').  Additionally, there    */
           /* must be space for `num_hints' bits.                      */
 
-          if ( ( ip + 3 + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
+          if ( ( ip + 3 + (hinter ? ( ( decoder->num_hints + 7 ) >> 3 ) : 0) ) 
> limit )
             goto Syntax_Error;
 
           if ( hinter )

 
[1] http://dlc.sun.com/pdf/800-7895/800-7895.pdf

-- 
mailto:address@hidden



reply via email to

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