merge with cff-subset branch

This commit is contained in:
Michiharu Ariza 2018-11-07 15:08:55 -08:00
commit e0c30b961d
3 changed files with 6 additions and 0 deletions

View File

@ -247,6 +247,7 @@ struct CFF2CSOpSet : CSOpSet<BlendArg, OPSET, CFF2CSInterpEnv, PARAM, PATH>
static inline void process_vsindex (CFF2CSInterpEnv &env, PARAM& param) static inline void process_vsindex (CFF2CSInterpEnv &env, PARAM& param)
{ {
env.process_vsindex (); env.process_vsindex ();
env.clear_args ();
} }
private: private:

View File

@ -64,6 +64,8 @@ struct Encoding0 {
inline hb_codepoint_t get_code (hb_codepoint_t glyph) const inline hb_codepoint_t get_code (hb_codepoint_t glyph) const
{ {
assert (glyph > 0);
glyph--;
if (glyph < nCodes) if (glyph < nCodes)
{ {
return (hb_codepoint_t)codes[glyph]; return (hb_codepoint_t)codes[glyph];
@ -106,6 +108,8 @@ struct Encoding1 {
inline hb_codepoint_t get_code (hb_codepoint_t glyph) const inline hb_codepoint_t get_code (hb_codepoint_t glyph) const
{ {
assert (glyph > 0);
glyph--;
for (unsigned int i = 0; i < nRanges; i++) for (unsigned int i = 0; i < nRanges; i++)
{ {
if (glyph <= ranges[i].nLeft) if (glyph <= ranges[i].nLeft)

View File

@ -347,6 +347,7 @@ struct CFF2PrivateDictOpSet : DictOpSet
case OpCode_vsindexdict: case OpCode_vsindexdict:
env.process_vsindex (); env.process_vsindex ();
dictval.ivs = env.get_ivs (); dictval.ivs = env.get_ivs ();
env.clear_args ();
break; break;
case OpCode_blenddict: case OpCode_blenddict:
break; break;