[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.
This commit is contained in:
parent
a0f43f207b
commit
d2d843a01c
2 changed files with 18 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
[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 <mpsuzuki@hiroshima-u.ac.jp>
|
||||
|
||||
[cff] Make trace message in cff_charset_load() verbose.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue