mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 10:04:24 +01:00
fixed vstem handling (lack thereof) in check_width
bug exposed by U+2261 equivalence in SourceCodePro-Regular.otf
This commit is contained in:
1 parent
26c291aaa0
commit
8798416587
1 file changed
+4
-1
@@ -92,12 +92,13 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
|
||||
bool has_width = false;
|
||||
switch (op)
|
||||
{
|
||||
default:
|
||||
case OpCode_endchar:
|
||||
has_width = (env.argStack.get_count () > 0);
|
||||
break;
|
||||
case OpCode_hstem:
|
||||
case OpCode_hstemhm:
|
||||
case OpCode_vstem:
|
||||
case OpCode_vstemhm:
|
||||
case OpCode_hintmask:
|
||||
case OpCode_cntrmask:
|
||||
has_width = ((env.argStack.get_count () & 1) != 0);
|
||||
@@ -109,6 +110,8 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
|
||||
case OpCode_rmoveto:
|
||||
has_width = (env.argStack.get_count () > 2);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
env.set_width (has_width);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user