Skip to content

Glyph struct optimisation #210

@benoitkugler

Description

@benoitkugler

Hi,

I was wondering how you would consider a breaking change cleaning and optimizing the shaping.Glyph struct.
There are two changes I would like to make :

  • replacing the fields XAdvance and YAdvance by an unique Advance field. XAdvance and YAdvance are never used together : XAdvance is for horizontal text, YAdvance for vertical text. With this change, we could also simplify our internal logic and remove switches on the direction.

  • as once suggested by Chris, we could reduce the size of the RuneCount and GlyphCount fields to use uint8. In practice, theses numbers never exceed (say) 10, so using a full int is a bit of a waste.

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