question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feaLib] "Expected name id < 255" check

See original GitHub issue

@brawer is it OK to remove this check from feaLib’s parse_nameid_?

        if nameID > 255:
            raise FeatureLibError("Expected name id < 255",
                                  self.cur_token_location_)

I ran into it while working on a project that requires hardcoding some nameids, and I can’t think of a reason for blocking them, specially since they’re outside the reserved range.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
Arno-Enslincommented, Jul 24, 2017

From the OT spec:

Name IDs 256 to 32767, inclusive, are reserved for font-specific names such as those referenced by a font’s layout features.

Instead of removing the check, wouldn’t it be better to check, whether the ID is < 32767 (or 32768)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diff - 3aedd105d78b03a1821e6b20f5ad8f096fa49c7a^! - platform ...
diff --git a/Lib/fontTools/feaLib/__main__.py ... nameID = nameID #: Name ID as integer (e.g. 9 for designer's name) self.
Read more >
feaLib: Read/write OpenType feature files - fontTools
fontTools' feaLib allows for the creation and parsing of Adobe Font ... If the iterable is left empty, no glyph name in glyph...
Read more >
fonttools/NEWS.rst at main - GitHub
A library to manipulate font files from Python. Contribute to fonttools/fonttools development by creating an account on GitHub.
Read more >
fonttools [python-library] - Occam :: Details
This command will install fonttools, as well as the optional dependencies that are required to unlock the extra features named "ufo", etc. Lib/fontTools/misc/ ......
Read more >
fonttools · PyPI
[subset] Keep all --name-IDs from 0 to 6 by default (#1170, #605, #114). ... [feaLib] Enable setting nameIDs greater than 255 (#1003).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found