diff --git a/ChangeLog b/ChangeLog index 4ca36a854..7e5a31420 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-07-16 Werner Lemberg + + Handle CID-keyed fonts wrapped in a SFNT (with cmaps) correctly. + + * src/cff/cffload.c (cff_font_load): Pass `pure_cff'. + Invert sids table only if `pure_cff' is set. + * src/cff/cffload.h: Udpated. + + * src/cff/cffobjs.c (cff_face_init): Updated. + 2008-07-09 Werner Lemberg * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts diff --git a/docs/CHANGES b/docs/CHANGES index cb662c706..c99d3ba45 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -1,3 +1,12 @@ +CHANGES BETWEEN 2.3.8 and 2.3.7 + + I. IMPORTANT BUG FIXES + + - CID-keyed fonts in an SFNT wrapper were not handled correctly. + + +====================================================================== + CHANGES BETWEEN 2.3.7 and 2.3.6 I. IMPORTANT BUG FIXES diff --git a/src/cff/cffload.c b/src/cff/cffload.c index 1e7dd1436..0178c8180 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -4,7 +4,7 @@ /* */ /* OpenType and CFF data/program tables loader (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1355,7 +1355,8 @@ FT_LOCAL_DEF( FT_Error ) cff_font_load( FT_Stream stream, FT_Int face_index, - CFF_Font font ) + CFF_Font font, + FT_Bool pure_cff ) { static const FT_Frame_Field cff_header_fields[] = { @@ -1519,7 +1520,7 @@ /* read the Charset and Encoding tables if available */ if ( font->num_glyphs > 0 ) { - FT_Bool invert = FT_BOOL( dict->cid_registry != 0xFFFFU ); + FT_Bool invert = FT_BOOL( dict->cid_registry != 0xFFFFU && pure_cff ); error = cff_charset_load( &font->charset, font->num_glyphs, stream, diff --git a/src/cff/cffload.h b/src/cff/cffload.h index 068cbb58c..02498bd5e 100644 --- a/src/cff/cffload.h +++ b/src/cff/cffload.h @@ -4,7 +4,7 @@ /* */ /* OpenType & CFF data/program tables loader (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2007 by */ +/* Copyright 1996-2001, 2002, 2003, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -60,7 +60,8 @@ FT_BEGIN_HEADER FT_LOCAL( FT_Error ) cff_font_load( FT_Stream stream, FT_Int face_index, - CFF_Font font ); + CFF_Font font, + FT_Bool pure_cff ); FT_LOCAL( void ) cff_font_done( CFF_Font font ); diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index d57518327..dec152b08 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -508,7 +508,7 @@ goto Exit; face->extra.data = cff; - error = cff_font_load( stream, face_index, cff ); + error = cff_font_load( stream, face_index, cff, pure_cff ); if ( error ) goto Exit;