Skip to content

Graphite font engine doesn't work #1183

Closed
@CraftSpider

Description

@CraftSpider

As listed in the title. If one uses a font and requests the graphite engine, like \font\g="[LinLibertine_R_G]/GR", then multiple operations either don't work correctly, or cause errors.

  • Attempting to enable features using the :ss05 syntax leads to 'feature not found' even if the feature exists - this is due to values returned by gr_fref_label not being the 4-character font selector, but instead more like a human-readable tagline. Instead of ss05 they'll be 'ss05' Some description of the feature.
  • use \XeTeXisdefaultselector can segfault due to tag_from_lang returning a nullptr (expected, the null/invalid language has no string representation).
  • Other small issues - there's definitely at least one memory leak due to allocating memory then just dropping the pointer, and several other graphite methods are used in potentially odd ways.

I intend to fix these issues in #1138, but I also wanted to ask basically - how much do we care? I discovered these issues writing tests for my rewrite, but apparently literally no one has uses the graphite engine enough to find these incredibly easy to run-into bugs. fontspec just doesn't ever use the graphite engine, and some quick googling didn't find anyone using the /GR selector.

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