Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feaLib's VariableScalar should allow float values in axis locations #3906

@anthrotype

Description

@anthrotype

After we let un-truncated float values in glyphsLib's Axis Location custom parameters (these are used to define user-space locations of masters and instances), we started getting new build failures from fonttools feaLib about "Base master not found", e.g.:

googlefonts/glyphsLib#1105

The problem seems to be feaLib VariableScalar's __repr__ as well as feaLib.parser are enforcing the axis coordinates of VariableScalars (e.g. such as those used for variable kerning or mark positioning) to be integers.

We should allow them to also be floating-point values, because the fvar's user-space coordinates are defined as Fixed in the OT spec so may well contain fractional values, and it's best to let them optionally be floats.

I'll make a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions