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.

pyftsubset incorrect documentation for --layout-features

See original GitHub issue

It seems that the documentation for --layout-features='*' should be --layout-features=* (no single quotes). I’m guessing that other similar documentation in the lines above also needs updating.

The result of --layout-features=‘*’ was to silently drop all GSUB entries, which caused me some head-scratching.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ClintGosscommented, May 11, 2020

Here is testing using these command (I have to write “asterisk” since that is a metacharacter … sigh)

echo --layout-features=‘asterisk’ and echo --layout-features=“asterisk”

(I cannot easily test the pyftsubset command directly, since it is exec’ed by a perl script driven by an Excel spreadsheet, fired from a make script … that takes 9+ hours to fully run - this is a big font project).

Windows Console aka Command Prompt (cmd.exe) returns --layout-features=‘asterisk’ and --layout-features=“asterisk”. These will fail with pyftsubset.

Windows PowerShell returns --layout-features=asterisk for both single and double quote version, so I would expect it to succeed with pyftsubset.

The shiny new Windows Terminal, as expected, emulates Console and Powershell correctly: in Command Prompt mode behaves like Windows Console (i.e would fail with pyftsubest) and in PowerShell Prompt mode behaves like Windows Powershell (i.e. would be OK with pysftsubet).

In Azure Cloud Shell … first time trying this … go to a web site? Enter an authentication code?? Sign in??? Establish my cloud based development environment??? sorry … too much of a rabbit hole to test this mode.

So … its only Windows Console / Command Prompt that fails, and I expect by the echo test that it would fail for both single and double quotes.

0reactions
madigcommented, May 12, 2020

What a pipeline.

What I mean is that argument quoting is fraught with peril on Windows due to a fundamental mistake in API design. You need to check every layer if it passes the quotes on correctly. See e.g. https://docs.python.org/3/library/subprocess.html#converting-an-argument-sequence-to-a-string-on-windows

Read more comments on GitHub >

github_iconTop Results From Across the Web

subset — fontTools Documentation - Read the Docs
pyftsubset is an OpenType font subsetter and optimizer, based on fontTools. ... the specified glyphs or characters, and specified OpenType layout features.
Read more >
Pyftsubset fails to include codepoints outside BMP · Issue #750
I seems pyftsubset cannot handle characters that fall outside of Unicode's Basic Multilingual Plane (BMP), and/or are encoded in above 21 ...
Read more >
Creating font subsets - Dev Diary
To create subsets, you can use online tools like the web font generator from Font Squirrel, but here I'll show you how to...
Read more >
fonttools-opentype-feature-freezer
See the Documentation for info about how to use the GUI app. ... accessible via the OpenType Layout features c2sc (for uppercase) and...
Read more >
Subset woff not recognised by browsers (bug?) - Google Groups
The little problem with pyftsubset is the logic of its options: by default, ... The usage documentation of hb-view is wonderful, and pyftsubset...
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