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 SVG table with pyftsubset

See original GitHub issue

It’s noted in this issue that the subetter doesn’t know how to subset the SVG table. It would be nice if it did as SVG fonts can use all the optimization they can get 😃

Currently, I have to explicitly tell pyftsusbet to leave the SVG table alone, as per instructions in the mentioned issue, so that should change too:

pyftsubset --verbose --no-subset-tables+='SVG ' --drop-tables-='SVG '  my-test-font.otf  --text='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ao123%‰€$¢£¥áâàäåãæçéêèëíîìïıñóôòöõøœšßúûùüýÿžÁÂÀÄÅÃÆÇÉÊÈËÍÎÌÏÑÓÔÒÖÕØŒŠÚÛÙÜÝŸ.,:;-–—•·...“‘’‘‚“”„‹›«»/\?!¿¡()[]{}†*&©®@#§+×=_°|'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
anthrotypecommented, Nov 16, 2021

We can finally subset OT-SVG fonts! 🥳 It should work with simple fonts (with single color glyph per SVG document, like most of the OT-SVG fonts out there) as well as more complex ones with lots of cross-references. Please test your fonts and send us bug reports. I’ll make a release soon.

1reaction
RoelNcommented, Oct 21, 2021

Unfortunately I only know of OT SVG fonts that use individual SVG documents per glyph, like bixacolor.com.

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. ... When subsetting SVG table, use lxml pretty_print=True option to indent the ......
Read more >
[subset] Extended usage info for pyftsubset - Google Groups
pyftsubset -- OpenType font subsetter and optimizer pyftsubset is an OpenType font ... drop the default set of tables but keep 'SVG '...
Read more >
fonttools - PyPI
Commands for inspecting, merging and subsetting fonts are also available: ... EBLC/EBDT embedded bitmaps, and SVG table (thanks to Read Roberts at Adobe)....
Read more >
NEWS.rst - third_party/fonttools - Git at Google - fuchsia Git ...
[subset] Support subsetting SVG table and remove it from the list of drop by default tables (#534). - [subset] add ``--pretty-svg`` option to...
Read more >
python - How to realize a table with a specific elements subset
Since you use tabulate, there is a solution to modify your code by: Adding an extra row full of characters of specified size...
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