Skip to content

Clarify intended behaviour of _getAbvmGlyphs #901

Open
@cmyr

Description

@cmyr

Tracking down another small diff with fontc, which has led me to have some doubts about how classifyGlyphs is used in the _getAbvmGlyphs method in markFeatureWriter.py.

The problem as I understand it:

  • classifyGlyphs keeps track of 'neutral' glyphs, those for which the classification function returns None.
  • the unicodeIsAbvm and unicodeIsNotAbvm functions return bools, never None
  • which means that nothing is ever considered 'neutral'
  • which can interfere with GSUB closure, below.

Specifically, imagine the following FEA:

languagesystem DFLT dflt;
languagesystem dev2 dflt;

feature akhn {
    script dev2;
    lookup eyelash_ra {
        sub ra-deva' halant-deva' uni200D by eyelash-deva;
    } eyelash_ra;
} akhn;

We will in this case fail to determine that eyelash-deva is an abvm glyph, because we will have determined that uni200D is explicitly not in abvm, and hence will not be included when we are computing the closure, which means that any generated mark positioning rules for which eyelash-deva is a base will end up in the mark feature instead of the abvm feature, which seems wrong.

I believe it would make more sense if the unicodeIsAbvm/unicodeIsNotAbvm functions returned None and not False if a particular codepoint doesn't map to one of the relevant scripts?

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