Skip to content

avar table confuses rvrn GSUB lookup #521

@drott

Description

@drott

Running
for i in `seq 1 1000`; do echo $i; hb-shape --variations="FVTT=$i" avar_rvrn.ttf r; done
on the font in avar_rvrn.zip

which has a variation alternates glyph substitution with the following characteristics:

        <SingleSubst index="0" Format="1">
          <Substitution in="rvrn_base" out="rvrn_subst"/>
        </SingleSubst>

        <ConditionSet>
          <!-- ConditionCount=1 -->
          <ConditionTable index="0" Format="1">
            <AxisIndex value="1"/>


            <FilterRangeMinValue value="0.666667"/>
            <FilterRangeMaxValue value="1.0"/>
          </ConditionTable>
        </ConditionSet>

and an FVTT axis as follows:

    <Axis>
      <AxisTag>FVTT</AxisTag>
      <Flags>0x0</Flags>
      <MinValue>0.0</MinValue>
      <DefaultValue>0.0</DefaultValue>
      <MaxValue>630.0</MaxValue>
      <AxisNameID>259</AxisNameID>
    </Axis>

And an avar entry as follows:

    <segment axis="FVTT">
      <mapping from="-1.0" to="-1.0"/>
      <mapping from="0.0" to="0.0"/>
      <mapping from="0.666667" to="0.5"/>
      <mapping from="1.0" to="1.0"/>
    </segment>

The above shell loop produces rvrn_subst output for more than one range, which it should not.
Abbreviated output below:

1
[rvrn_base=0+1529]
...
350
[rvrn_base=0+1529]
351
[rvrn_subst=0+1825]
...
419
[rvrn_subst=0+1825]
420
[rvrn_base=0+1529]
421
[rvrn_subst=0+1825]
...
526
[rvrn_base=0+1529]
...
629
[rvrn_base=0+1529]
630
[rvrn_subst=0+1825]
...
999
[rvrn_subst=0+1825]
1000
[rvrn_subst=0+1825]

Metadata

Metadata

Assignees

No one assigned

    Labels

    ChromeChrome/Chromium project related issues and requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions