[cff] Add code to Adobe's engine to handle ppem > 2000. * src/cff/cffgload.c (cff_slot_load): If we get FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
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
diff --git a/ChangeLog b/ChangeLog
index 96b1528..9dbab8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-06 Dave Arnold <darnold@adobe.com>
+ Werner Lemberg <wl@gnu.org>
+
+ [cff] Add code to Adobe's engine to handle ppem > 2000.
+
+ * src/cff/cffgload.c (cff_slot_load): If we get
+ FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
+
2013-06-12 Werner Lemberg <wl@gnu.org>.
Another try on pragmas.
@@ -8,7 +16,7 @@
* include/freetype/internal/ftserv.h: Remove pragma which has no
effect.
-2013-06-12 Werner Lemberg <wl@gnu.org>.
+2013-06-12 Werner Lemberg <wl@gnu.org>
* include/freetype/internal/ftdebug.h: Disable MSVC warning C4127.
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 1904ca0..6a8494f 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2849,7 +2849,16 @@
/* as a consequence, glyphs larger than 2000ppem get rejected */
if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
{
- /* XXX to be implemented */
+ /* this time, we retry unhinted and scale up the glyph later on */
+ /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
+ /* 0x400 for both `x_scale' and `y_scale' in this case) */
+ hinting = FALSE;
+ force_scaling = TRUE;
+ glyph->hint = hinting;
+
+ error = cf2_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
}
}