Fix Savannah bug #28521. Issue #28226 involved a work-around for a font which used the `setcurrentpoint' operator in an invalid way; this operator is only supposed to be used with the result of OtherSubrs, and the font used it directly. The supplied patch removed the block of code which checked this usage entirely. This turns out to be a Bad Thing. If `setcurrentpoint' is being used correctly it should reset the flex flag in the decoder. If we don't do this then the flag never gets reset and we omit any further contours from the glyph (at least until we close the path or similar). * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_setcurrentpoint>: Handle `flex_state' correctly.
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 8772521..1d4ba8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2010-01-08 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #28521.
+
+ Issue #28226 involved a work-around for a font which used the
+ `setcurrentpoint' operator in an invalid way; this operator is only
+ supposed to be used with the result of OtherSubrs, and the font used
+ it directly. The supplied patch removed the block of code which
+ checked this usage entirely.
+
+ This turns out to be a Bad Thing. If `setcurrentpoint' is being
+ used correctly it should reset the flex flag in the decoder. If we
+ don't do this then the flag never gets reset and we omit any further
+ contours from the glyph (at least until we close the path or
+ similar).
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_setcurrentpoint>: Handle `flex_state' correctly.
+
2010-01-05 Werner Lemberg <wl@gnu.org>
Apply reports from clang static analyzer.
@@ -134,6 +153,9 @@
initial point to (0,0). Unnecessarily so, as they correctly use an
`hsbw' operation which implicitly sets the initial point.
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_setcurrentpoint>: Comment out code.
+
2009-12-14 Bram Tassyns <bramt@enfocus.be>
Fix parsing of /CIDFontVersion.
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 2b535b0..31554ff 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -1459,7 +1459,6 @@
case op_setcurrentpoint:
FT_TRACE4(( " setcurrentpoint" ));
-#if 0
/* From the T1 specification, section 6.4: */
/* */
/* The setcurrentpoint command is used only in */
@@ -1472,6 +1471,7 @@
/* Distiller handle this situation by silently ignoring */
/* the inappropriate `setcurrentpoint' instruction. So */
/* we do the same. */
+#if 0
if ( decoder->flex_state != 1 )
{
@@ -1480,8 +1480,8 @@
goto Syntax_Error;
}
else
- decoder->flex_state = 0;
#endif
+ decoder->flex_state = 0;
break;
case op_unknown15: