misc bug fixes

Added OpCode_FontMatrix to TopDictOpSet (yet to parse values)
fixed a wrong assert in encode_int
This commit is contained in:
Michiharu Ariza 2018-09-11 16:47:55 -07:00
parent 5b453f77f8
commit 497e7fb264
2 changed files with 4 additions and 1 deletions

View File

@ -279,6 +279,9 @@ struct TopDictOpSet : DictOpSet
return false;
env.clear_args ();
break;
case OpCode_FontMatrix:
env.clear_args ();
break;
default:
return DictOpSet::process_op (op, env);
}

View File

@ -59,7 +59,7 @@ struct ByteStrBuff : hb_vector_t<char, 1>
return encode_byte ((v >> 8) + OpCode_TwoByteNegInt0) && encode_byte (v & 0xFF);
}
}
assert ((v & ~0xFFFF) == 0);
assert ((-32768 <= v) && (v <= 32767));
return encode_byte (OpCode_shortint) &&
encode_byte ((v >> 8) & 0xFF) &&
encode_byte (v & 0xFF);