Skip to content

Support GSUB Multiple Substitution (Type 2) and the ccmp feature #2511

Description

@swmal

GSUB Lookup Type 2 (Multiple Substitution) is not implemented. A font cannot expand one glyph into a sequence of several - the opposite direction of Ligature Substitution (Type 4), which is supported. This is what most real-world ccmp decomposition relies on: splitting a precomposed glyph into a base glyph plus combining marks so that mark positioning can work on them.

The ccmp feature is also unreachable from the public API - it has no flag in the GsubFeature enum - so it can neither be requested nor enabled by default, even where the underlying lookups are already supported.

Scope:

  • Parse, serialize and subset Lookup Type 2 (MultipleSubstSubTable).
  • Apply it during shaping, before other substitutions.
  • Preserve the expanded glyphs through subsetting so the embedded PDF font matches what was measured.
  • Add GsubFeature.Ccmp and enable it by default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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