ref: d2d843a01ce7815c11458eb0c1a319a525139af1
parent: a0f43f207b68520369eba4e84b02c5f69f0f542b
author: suzuki toshiya <[email protected]>
date: Sun Sep 19 21:28:17 EDT 2010
[cff] Ignore CID > 0xFFFFU. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if greater than 0xFFFFU. CFF font spec does not mention about maximum CID in the font, but PostScript and PDF spec define that maximum CID is 0xFFFFU.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2010-09-19 suzuki toshiya <[email protected]>
+ [cff] Ignore CID > 0xFFFFU.
+ See Savannah bug #30975.
+
+ * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
+ greater than 0xFFFFU. CFF font spec does not mention about
+ maximum CID in the font, but PostScript and PDF spec define
+ that maximum CID is 0xFFFFU.
+
+2010-09-19 suzuki toshiya <[email protected]>
+
[cff] Make trace message in cff_charset_load() verbose.
See Savannah bug #30975.
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -779,8 +779,15 @@
goto Exit;
for ( i = 0; i < num_glyphs; i++ )
- if ( charset->sids[i] > max_cid )
+ {
+ if ( charset->sids[i] > 0xFFFFU )
+ FT_ERROR(( "cff_charset_compute_cids():"
+ " ignore CID (0x%lx) for SID (0x%lx),"
+ " greater than PS/PDF spec\n",
+ charset->sids[i], i ));
+ else if ( charset->sids[i] > max_cid )
max_cid = charset->sids[i];
+ }
if ( FT_NEW_ARRAY( charset->cids, max_cid + 1 ) )
goto Exit;