misc bug fixes

Added OpCode_FontMatrix to TopDictOpSet (yet to parse values)
fixed a wrong assert in encode_int
pull/1113/head
Michiharu Ariza 6 years ago
parent 5b453f77f8
commit 497e7fb264
  1. 3
      src/hb-cff-interp-dict-common.hh
  2. 2
      src/hb-subset-cff-common.hh

@ -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);
}

@ -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);

Loading…
Cancel
Save