You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is problematic, as varLib uses otRound, so static instances do not exactly match their cousins inside a variable font made with varLib. In testing this with Cantarell, I found a large number of off-by-ones between the two rounding methods.
Simply swapping the methods out doesn't work, as round3() takes an ndigits argument, while otRound doesn't. Maybe as a compromise, round3() can be used when there is an ndigits argument, otherwise otRound? Can provide PR.
Edit: although, varLib is not the only possible user. I haven't looked at mutatorMath.
The text was updated successfully, but these errors were encountered:
i think it should be ok using the round3 when ndigits is not None, else doins the same as fontTools otRound (i.e. int(math.floor(value + 0.5))) when rounding to full integers.
anthrotype
added a commit
to anthrotype/fontMath
that referenced
this issue
Mar 21, 2019
This is problematic, as varLib uses
otRound
, so static instances do not exactly match their cousins inside a variable font made with varLib. In testing this with Cantarell, I found a large number of off-by-ones between the two rounding methods.Simply swapping the methods out doesn't work, as
round3()
takes anndigits
argument, whileotRound
doesn't. Maybe as a compromise,round3()
can be used when there is anndigits
argument, otherwiseotRound
? Can provide PR.Edit: although, varLib is not the only possible user. I haven't looked at mutatorMath.
The text was updated successfully, but these errors were encountered: