Skip to content

Remove the "last gid" hack from encoder implementation #108

@garretrieger

Description

@garretrieger

Context: https://github.com/w3c/ift-encoder/blob/main/ift/encoder/encoder.cc#L219

When producing mixed encodings we need to ensure at each level of invalidating extension the loca/gvar/CFF/CFF2 offset arrays are large enough to accomadate any glyphs that may be added by any reachable glyph patches. This is currently handled using a crude hack of including the last gid of the original font in the initial subset (so that loca/gvar/CFF/CFF2 offset arrays are always at their maximum size).

As currently implemented this is sub optimal and will also conflict with producing a true desiccated font (#104). Instead at each level of invalidating extension we should determine what the maximum reachable glyph id is and ensure the loca/gvar/CFF/CFF2 offsets arrays are large enough to accomadate.

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