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.

[subset] Default to all glyphs?

See original GitHub issue

A lot of people use our subsetter to simply convert ttf to woff/woff2. That’s a lot of work for such a conversion! Ideally we’d have a fonttools.convert module that wouldn’t incur the subsetting cost (and the surprises that come with subsetting) doing that.

But then sometimes people also want to provide --no-hinting and other options for such operations. So yeah, this borders on subsetting, so maybe is fine that subset module is being used for all kinds of conversions. We can even have a very light fonttools.convert module that calls subsetter if necessary…

In such uses it’s common for users to pass --glyphs='*'. If no glyph or Unicode codepoints is provided, I’m not sure what the subsetter does currently, but it feels like would be nice defaulting to all glyphs. Though, one can argue that (and I think I agree!) we should default to all Unicodes and throw out unreachable glyphs.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
anthrotypecommented, Apr 30, 2020

changing the current default values for the subsetter is not advisable, in my opinion, as it would break all existing scripts or tools that use it without explicitly setting all values (i.e. a lot)

1reaction
behdadcommented, Apr 30, 2020

why throw out glyphs without unicodes by default?

That’s not what I said. 😃 I said “unreachable glyphs”. Those are glyphs that are not accessible via any feature…

Marc is correct that by default the features pyftsubset keeps are features are used by default in shaping. Ie. any extras are not retained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

subset — fontTools Documentation - Read the Docs
The subsetted glyph set is based on the specified glyphs or characters, and specified OpenType layout ... TRK'. By default all scripts are...
Read more >
Creating font subsets - Dev Diary
Subsetting fonts is the process of taking a large font file as ... Type pyftsubset --layout-features=? to see all the defaults features.
Read more >
hb-subset: HarfBuzz Manual
Subsetting reduces the codepoint coverage of font files and removes all data that is no longer needed. A subset input describes the desired...
Read more >
Subset Font By Specific Glyphs - Stack Overflow
I have a 14MB TTF containing mostly Simplified Chinese characters. I'd like to reduce the size by creating a subset which only contains...
Read more >
Default fonts should be subset consistently · Issue #4542 · uswds ...
Describe the bug USWDS currently ships with 4 default fonts: Merriweather, Public Sans, Roboto Mono, and Source Sans Pro. Of these, all except...
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