use 2-byte offset instead of 4-byte for local subrs

more than enough since local subrs immediately follow its corresponding private dict, as the result 2-byte redunction for each font dict with local subrs
updated api test expected subset fonts accordingly
This commit is contained in:
Michiharu Ariza 2018-11-15 15:41:46 -08:00
parent 9d0231cfe7
commit 072c7aba92
10 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ struct CFFPrivateDict_OpSerializer : OpSerializer
if (desubroutinize || (subrsOffset == 0))
return_trace (true);
else
return_trace (FontDict::serialize_offset4_op (c, opstr.op, subrsOffset));
return_trace (FontDict::serialize_offset2_op (c, opstr.op, subrsOffset));
}
else
return_trace (copy_opstr (c, opstr));
@ -274,7 +274,7 @@ struct CFFPrivateDict_OpSerializer : OpSerializer
if (desubroutinize || !has_localsubr)
return 0;
else
return OpCode_Size (OpCode_longintdict) + 4 + OpCode_Size (opstr.op);
return OpCode_Size (OpCode_shortint) + 2 + OpCode_Size (opstr.op);
}
else
return opstr.str.len;

Binary file not shown.