Skip to content

Commit

Permalink
Fix reversed STAT flags
Browse files Browse the repository at this point in the history
  • Loading branch information
punchcutter authored and josh-hadley committed Jun 22, 2020
1 parent 4272278 commit e390dc3
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions c/makeotf/makeotf_lib/build/hotpccts/featgram.g
Original file line number Diff line number Diff line change
Expand Up @@ -1988,9 +1988,9 @@ designAxis

axisValueFlag[uint16_t *flags]
:
K_ElidableAxisValueName << *flags |= 0x0001; >>
K_OlderSiblingFontAttribute << *flags |= 0x0001; >>
|
K_OlderSiblingFontAttribute << *flags |= 0x0002; >>
K_ElidableAxisValueName << *flags |= 0x0002; >>
;

axisValueFlags>[uint16_t flags]
Expand Down
8 changes: 4 additions & 4 deletions c/makeotf/makeotf_lib/source/hotconv/featgram.c
Original file line number Diff line number Diff line change
Expand Up @@ -4723,14 +4723,14 @@ axisValueFlag(uint16_t *flags)
zzBLOCK(zztasp1);
zzMake0;
{
if ((LA(1) == K_ElidableAxisValueName)) {
zzmatch(K_ElidableAxisValueName);
if ((LA(1) == K_OlderSiblingFontAttribute)) {
zzmatch(K_OlderSiblingFontAttribute);
*flags |= 0x0001;
zzCONSUME;

} else {
if ((LA(1) == K_OlderSiblingFontAttribute)) {
zzmatch(K_OlderSiblingFontAttribute);
if ((LA(1) == K_ElidableAxisValueName)) {
zzmatch(K_ElidableAxisValueName);
*flags |= 0x0002;
zzCONSUME;

Expand Down
10 changes: 5 additions & 5 deletions tests/makeotfexe_data/expected_output/spec/9i-1.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -87,35 +87,35 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="259"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
<AxisValue index="1" Format="2">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="260"/> <!-- Regular -->
<NominalValue value="400.0"/>
<RangeMinValue value="300.0"/>
<RangeMaxValue value="500.0"/>
</AxisValue>
<AxisValue index="2" Format="3">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="261"/> <!-- Regular -->
<Value value="400.0"/>
<LinkedValue value="700.0"/>
</AxisValue>
<AxisValue index="3" Format="3">
<AxisIndex value="1"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="262"/> <!-- Regular -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="4" Format="4">
<!-- AxisCount=2 -->
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="263"/> <!-- Mediumitalic -->
<AxisValueRecord index="0">
<AxisIndex value="0"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/makeotfexe_data/expected_output/spec/9i-2.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="257"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
Expand Down
2 changes: 1 addition & 1 deletion tests/makeotfexe_data/expected_output/spec/9i-20.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="257"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
Expand Down
2 changes: 1 addition & 1 deletion tests/makeotfexe_data/expected_output/spec/9i-21.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="257"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
Expand Down
4 changes: 2 additions & 2 deletions tests/makeotfexe_data/expected_output/spec/9i-25.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
<AxisValueArray>
<AxisValue index="0" Format="2">
<AxisIndex value="0"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="259"/> <!-- Regular -->
<NominalValue value="400.0"/>
<RangeMinValue value="-300.54"/>
<RangeMaxValue value="450.6"/>
</AxisValue>
<AxisValue index="1" Format="1">
<AxisIndex value="1"/>
<Flags value="1"/>
<Flags value="2"/>
<ValueNameID value="260"/> <!-- Italic -->
<Value value="1.0"/>
</AxisValue>
Expand Down
2 changes: 1 addition & 1 deletion tests/makeotfexe_data/expected_output/spec/9i-4.ttx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="2"/>
<Flags value="1"/>
<ValueNameID value="258"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
Expand Down

0 comments on commit e390dc3

Please sign in to comment.