[HarfBuzz] Fwd: Announcing a new font subsetter

Behdad Esfahbod behdad at behdad.org
Fri Aug 30 11:27:07 PDT 2013


Thought people here may find an OpenType subsetter interesting.


-------- Original Message --------
Subject: Announcing a new font subsetter
Date: Fri, 30 Aug 2013 14:26:43 -0400
From: Behdad Esfahbod <behdad at behdad.org>
To: Fontforge-devel list <fontforge-devel at lists.sourceforge.net>

Hi,

If you like to follow / discuss my fonttools work, please subscribe to this group:

  https://groups.google.com/forum/#!forum/fonttools

The code is at:

  https://github.com/behdad/fonttools

My fonttools tree now has three new features:

  * SVG table implementation contributed by Adobe,

  * A new full font subsetter (GSUB/GPOS, CFF, everything), call pyftsubset,

  * A PyGTK-based font viewer called pyftfontview,

The subsetter takes many options, look for Options in the source
(fonttools/Lib/fontTools/subset.py) for now.  I'll add proper usage message
later.  Here's an example invocation:

$ pyftsubset Lobster.ttf L o b s t e r --verbose --flavor=woff
Unicodes: []
Glyphs: ['L', 'o', 'b', 's', 't', 'e', 'r']
VDMX dropped
cmap pruned
glyf pruned
kern pruned
name pruned
post pruned
GPOS pruned
GSUB pruned
Added gid0 to subset
Closing glyph list over 'GSUB': 8 glyphs before
Names:  ['.notdef', 'L', 'b', 'e', 'o', 'r', 's', 't']
Gids :  [0, 47, 69, 72, 82, 85, 86, 87]
Closed  glyph list over 'GSUB': 16 glyphs after
Names:  ['.notdef', 'L', 'b', 'b_s', 'b_s.end', 'e', 'e.end', 'o', 'o.end',
'o_s', 'o_s.end', 'r', 's', 's.end', 't', 't.end']
Gids :  [0, 47, 69, 72, 82, 85, 86, 87, 260, 261, 288, 364, 366, 367, 406, 412]
Closing glyph list over 'glyf': 16 glyphs before
Names:  ['.notdef', 'L', 'b', 'b_s', 'b_s.end', 'e', 'e.end', 'o', 'o.end',
'o_s', 'o_s.end', 'r', 's', 's.end', 't', 't.end']
Gids :  [0, 47, 69, 72, 82, 85, 86, 87, 260, 261, 288, 364, 366, 367, 406, 412]
Closed  glyph list over 'glyf': 16 glyphs after
Names:  ['.notdef', 'L', 'b', 'b_s', 'b_s.end', 'e', 'e.end', 'o', 'o.end',
'o_s', 'o_s.end', 'r', 's', 's.end', 't', 't.end']
Gids :  [0, 47, 69, 72, 82, 85, 86, 87, 260, 261, 288, 364, 366, 367, 406, 412]
Retaining 16 glyphs:
head subsetting not needed
hhea subsetting not needed
maxp subsetting not needed
OS/2 subsetting not needed
hmtx subsetted
cmap subsetted
loca subsetting not needed
glyf subsetted
kern subsetted to empty; dropped
name subsetting not needed
post subsetted
GDEF subsetted
GPOS subsetted
GSUB subsetted
glyf pruned
GPOS pruned
GSUB pruned
Input  font: 140856 bytes
Subset font: 2276 bytes


Feedback / feature requests / bug reports welcome.

Cheers,
-- 
behdad
http://behdad.org/





More information about the HarfBuzz mailing list