提交 497e7fb2 编写于 作者: M Michiharu Ariza

misc bug fixes

Added OpCode_FontMatrix to TopDictOpSet (yet to parse values)
fixed a wrong assert in encode_int
上级 5b453f77
...@@ -279,6 +279,9 @@ struct TopDictOpSet : DictOpSet ...@@ -279,6 +279,9 @@ struct TopDictOpSet : DictOpSet
return false; return false;
env.clear_args (); env.clear_args ();
break; break;
case OpCode_FontMatrix:
env.clear_args ();
break;
default: default:
return DictOpSet::process_op (op, env); return DictOpSet::process_op (op, env);
} }
......
...@@ -59,7 +59,7 @@ struct ByteStrBuff : hb_vector_t<char, 1> ...@@ -59,7 +59,7 @@ struct ByteStrBuff : hb_vector_t<char, 1>
return encode_byte ((v >> 8) + OpCode_TwoByteNegInt0) && encode_byte (v & 0xFF); 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) && return encode_byte (OpCode_shortint) &&
encode_byte ((v >> 8) & 0xFF) && encode_byte ((v >> 8) & 0xFF) &&
encode_byte (v & 0xFF); encode_byte (v & 0xFF);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册