In function CFF_Parse_CharStrings(), added support for deprecated operator "dotsection". Submitted by Sander van der Wal <svdwal@xs4all.nl>
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index f88ecee..7337bf4 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -74,6 +74,7 @@
cff_op_hintmask,
cff_op_cntrmask,
+ cff_op_dotsection,
cff_op_abs,
cff_op_add,
@@ -152,6 +153,7 @@
0, /* hintmask */
0, /* cntrmask */
+ 0, /* dotsection */
1, /* abs */
2,
@@ -790,7 +792,7 @@
if ( !( val & 0xFFFF ) )
FT_TRACE4(( " %d", (FT_Int32)( val >> 16 ) ));
else
- FT_TRACE4(( " %.2f", val/65536.0 ));
+ FT_TRACE4(( " %.2f", val / 65536.0 ));
#endif
}
@@ -841,6 +843,9 @@
switch ( v )
{
+ case 0:
+ op = cff_op_dotsection;
+ break;
case 3:
op = cff_op_and;
break;
@@ -1061,16 +1066,37 @@
case cff_op_hintmask:
case cff_op_cntrmask:
+
FT_TRACE4(( op == cff_op_hintmask ? " hintmask"
: " cntrmask" ));
decoder->num_hints += num_args / 2;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt maskbyte;
+
+ FT_TRACE4(( " " ));
+
+ for ( maskbyte = 0; maskbyte < ( decoder->num_hints + 7 ) >> 3 ; maskbyte++, ip++ )
+ {
+ FT_TRACE4(( "%02X", *ip ));
+ }
+
+ }
+#else
ip += ( decoder->num_hints + 7 ) >> 3;
+#endif
if ( ip >= limit )
goto Syntax_Error;
args = stack;
break;
+ case cff_op_dotsection:
+
+ FT_TRACE4(( " dotsection" ));
+ break;
+
case cff_op_rmoveto:
FT_TRACE4(( " rmoveto" ));
@@ -1676,7 +1702,7 @@
for (;;)
{
- new_root = ( root + FT_DivFix(args[0],root) + 1 ) >> 1;
+ new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1;
if ( new_root == root || count <= 0 )
break;
root = new_root;
@@ -1891,7 +1917,7 @@
zone++;
zone->base = decoder->locals[index];
- zone->limit = decoder->locals[index+1];
+ zone->limit = decoder->locals[index + 1];
zone->cursor = zone->base;
if ( !zone->base )