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: Dotted I doesn't get subset

See original GitHub issue

I don’t know if this was reported or I am doing something wrong but. I’m using pyftsubset to subset some characters from an otf font (I don’t believe it matters which font) but one character (dotted I) is not getting subset: https://www.fileformat.info/info/unicode/char/0130/index.htm the only way the character would be subset is if I do --unicodes=‘*’, but that is not what I want… I if do --unicodes=U+0130 it just doesn’t get through ( everything else works)

What is interesting is that I’ve tried to run the command with --verbose pyftsubset font.otf --output-file=newfont.otf --unicodes=U+0130 --verbose

Text: ''
Unicodes: [304]
Glyphs: []
Gids: []
maxp pruned
cmap pruned
post pruned
CFF  pruned
GPOS pruned
GSUB pruned
kern dropped
name pruned
Added .notdef to subset
Closing glyph list over 'GSUB': 2 glyphs before
Glyph names: ['.notdef', 'Idotaccent']
Glyph IDs:   [0, 259]
Closed glyph list over 'GSUB': 2 glyphs after
Glyph names: ['.notdef', 'Idotaccent']
Glyph IDs:   [0, 259]
Retaining 2 glyphs
head subsetting not needed
hhea subsetting not needed
maxp subsetting not needed
OS/2 subsetting not needed
cmap subsetted
post subsetted
CFF  subsetted
GPOS subsetted
GSUB subsetted
hmtx subsetted
name subsetting not needed
OS/2 Unicode ranges pruned: [2]
CFF  pruned
GPOS pruned
GSUB pruned
Input font: 109192 bytes: font.otf
Subset font:   1096 bytes: newfont.otf

And it looks ok, but if I type the character in with the font it doesn’t get shown, like there is no glyph for it while if I try it on the original (input) font it works ok. Am I missing something?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
behdadcommented, Jan 29, 2018

Ok. Figured out what’s going on. endchar operator in CFF can act like the deprecated seac operator. This aspect is not implemented in the subsetter. It’s not super hard to do, but not trivial either. I’ll do it at some point soonish hopefully.

0reactions
behdadcommented, Feb 4, 2018

I already fixed it.

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. It accepts any TT- or CFF-flavored OpenType (.otf or .ttf) or WOFF...
Read more >
Diff - platform/external/fonttools - Google Git
TTX files have a .ttx file extension:: +- ``pyftmerge``, a tool for merging fonts; see :py:mod:`fontTools.merge` +- ``pyftsubset``, a tool for subsetting ......
Read more >
How to use pyftsubset of Fonttools inside of the python ...
pyftsubset is itself just a Python script, which calls fontTools.subset.main , which in turn parses sys.argv (command-line args) to perform ...
Read more >
JuliaMono - Cormullion
So, for example, if you have the urge to use a dingbat (one of the ... Strip glyphs for f in /juliamono-source/*.ttf do...
Read more >
Creating font subsets - Dev Diary
You can use glyphhanger to subset your fonts, but I prefer pyftsubset because you can select what OpenType features you want.
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