* src/cff/cffload.c (cff_charser_load): modified charset loader to accept pre-defined charsets, even when the font contains fewer glyphs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/ChangeLog b/ChangeLog
index d944f69..d4ae5ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-23 David Turner <david@freetype.org>
+
+ * src/cff/cffload.c (cff_charser_load): modified charset loader to
+ accept pre-defined charsets, even when the font contains fewer glyphs
+
+2002-11-18 David Turner <david@freetype.org>
+
+ * FreeType 2.1.3 is released
+ ============================
+
2002-11-07 David Turner <david@freetype.org>
* src/cache/ftcsbit.c (ftc_sbit_node_load): fixed a small bug that caused
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index b21cfc3..e05dec7 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1595,17 +1595,16 @@
/* In order to use a predefined charset, the following must be */
/* true: The charset constructed for the glyphs in the font's */
/* charstrings dictionary must match the predefined charset in */
- /* the first num_glyphs, and hence must match the predefined */
- /* charset *exactly*. */
+ /* the first num_glyphs */
charset->offset = offset; /* record charset type */
switch ( (FT_UInt)offset )
{
case 0:
- if ( num_glyphs != 229 )
+ if ( num_glyphs > 229 )
{
- FT_ERROR(("cff_charset_load: implicit charset not equal to\n"
+ FT_ERROR(("cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe ISO-Latin)!\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
@@ -1622,9 +1621,9 @@
break;
case 1:
- if ( num_glyphs != 166 )
+ if ( num_glyphs > 166 )
{
- FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
+ FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert)!\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
@@ -1641,9 +1640,9 @@
break;
case 2:
- if ( num_glyphs != 87 )
+ if ( num_glyphs > 87 )
{
- FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
+ FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert Subset)!\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;