94 Commits

Author SHA1 Message Date
Behdad Esfahbod
1e7cb631a8 [subset] Err if options are not provided for list values 2014-08-13 16:20:06 -04:00
Behdad Esfahbod
bce7ef7ede [subset] Add looooooooonger usage
Based on text from Adam Twardoch.

Fixes https://github.com/behdad/fonttools/pull/15
2014-08-13 16:06:49 -04:00
Behdad Esfahbod
3c4b5e0a09 [subset] Work around OTS bug with FDSelect format 0
a049b98c88
https://github.com/khaledhosny/ots/pull/31

Fixes https://github.com/behdad/fonttools/issues/138
2014-07-23 00:04:32 -04:00
Behdad Esfahbod
88d4decc5f [subset] Handle None ChainContext
Fixes https://github.com/behdad/fonttools/issues/134
2014-07-02 17:09:22 -04:00
Behdad Esfahbod
dff3346ead [subset] Handle case of None ChainContext class with non-zero chain
It would be a font bug, but handle regardless.
2014-07-02 17:09:18 -04:00
Behdad Esfahbod
56a9c4cb42 [subset] Fix order of chain for consistency
I'm confident I haven't broken anything.
2014-07-02 16:57:26 -04:00
Behdad Esfahbod
ade1972557 Remove CFF Index.count member
Clean up.  len(index) should be used instead.
2014-06-16 15:35:15 -04:00
Behdad Esfahbod
149a6700a1 [subset] Minor 2014-06-16 15:33:53 -04:00
Behdad Esfahbod
cf2f85e4e2 [subset] Add TODO 2014-06-05 20:39:38 -04:00
Behdad Esfahbod
d15afe9231 [subset] Fix pruning of empty rulesets in (Chain)ContextFormat1
Similar to 98b60757ab9bb0aaa3c1f136e5a837a1b73d22ed and the
recent commits for Format2.
2014-06-05 20:19:38 -04:00
Behdad Esfahbod
a7cd151e14 [subset] Actually prune empty subrulesets in (Chain)ContextFormat2 2014-06-05 18:28:21 -04:00
Behdad Esfahbod
26cb08062d [subset] More fixing of (Chain)ContextFormat2
This is follow up to 98b60757ab9bb0aaa3c1f136e5a837a1b73d22ed
Looks like this lookup type is a curse to stay with us.  Sigh...
2014-06-05 18:24:53 -04:00
Behdad Esfahbod
3e19354bf5 [subset] Unbreak after e898881ed12d7ce96948f2905d725847c76bc9e8 2014-05-13 21:08:51 -04:00
Behdad Esfahbod
11631b4917 [subset] Fix PairPos subsetting
Ouch!

Fixes https://github.com/behdad/fonttools/pull/118
2014-05-13 14:31:42 -04:00
Behdad Esfahbod
e898881ed1 [subset] Implement format14 variation selectors 2014-05-09 17:48:02 -04:00
Behdad Esfahbod
f09164a0de [subset] Don't recalculate "modified" timestamp
To recalculate (which was the default before), use --recalc-timestamp

Fixes https://github.com/behdad/fonttools/issues/115
2014-05-01 15:16:14 -07:00
Behdad Esfahbod
11580c55bb Minor 2014-03-13 17:34:35 -07:00
Behdad Esfahbod
9f6ccad666 [subset] Correctly handle subsetting non-Unicode cmap subtables 2014-03-12 12:35:35 -07:00
Behdad Esfahbod
a08b1b1d20 [subset] Use NameRecord.isUnicode() 2014-03-12 12:33:40 -07:00
Behdad Esfahbod
2007a491e3 [subset] Use CmapSubtable.isUnicode()/isSymbol()
Fixes https://github.com/behdad/fonttools/issues/111
2014-03-12 12:27:11 -07:00
Behdad Esfahbod
1ae29591ef from __future__ import absolute_import
Such that our Python 2 is closer to Python 3.

Part of https://github.com/behdad/fonttools/issues/77
2014-01-14 15:07:50 +08:00
Behdad Esfahbod
fc1d0525b6 Merge branch 'merge' 2013-12-18 17:09:45 -05:00
Behdad Esfahbod
45ed572e31 [subset] Fix up from recent changes 2013-12-17 06:01:08 -05:00
Behdad Esfahbod
0be386edb5 [subset] Fix subsetting of Khmer fonts
Read comment.
2013-12-16 20:52:52 -05:00
Behdad Esfahbod
283fb26820 By default, don't load fonts lazily
Lazy loading has implications on how people use objects.
So, by default, don't load lazily.  This only affects
GSUB/GDEF/GPOS/etc and is closer to what fonttools used
to do traditionally.

Turn lazy loading on in subset and inspect.
2013-12-16 00:52:29 -05:00
Behdad Esfahbod
6c51f500fb [subset] Make sure objects are decompiled during subsetting
We need to ensureDecompiled() whenever an object is modified
before we look up any member of it.

Note that normally objects remaining decompiled until we try
to write them out is fine, except for when they depend on
font.getGlyphOrder().  This however, shouldn't normally happen
since if there's an object depending on the glyph list (eg. a
Coverage table), it should already have been process to subset
it according to the requested glyphs.  Or that's the idea at
least.  The few cases that were not handled are handled
explicitly now.

This was showing a bug when subsetting Cabin for example.
2013-12-15 23:15:15 -05:00
Behdad Esfahbod
fa95e87d42 [subset] Add more TODO items 2013-12-15 22:02:20 -05:00
Behdad Esfahbod
92af6a58b3 [subset] Work around OTS being stupid 2013-12-10 17:51:32 -05:00
Behdad Esfahbod
5fd8779fd3 [subset] Oops. Remove debug prints 2013-12-10 14:48:34 -05:00
Behdad Esfahbod
10a3fff5cb [subset] Fixup --recommended-glyphs 2013-12-08 15:22:32 -05:00
Behdad Esfahbod
c745f69d8a [subset] Remove unnecessary workaround 2013-12-07 16:06:14 -05:00
Behdad Esfahbod
3db5e11c1f [subset] Remove redundant language systems
After subsetting, remove language systems that are effectively
the same as the default language system.
2013-12-07 12:54:44 -05:00
Behdad Esfahbod
ec9436d7f6 [subset] Remove unreferenced features 2013-12-06 21:58:41 -05:00
Behdad Esfahbod
9d2481bedf [subset] Comments 2013-12-06 21:42:36 -05:00
Behdad Esfahbod
baa97d6f17 [subset] Minor 2013-12-06 21:12:05 -05:00
Behdad Esfahbod
05a2862a39 [subset] Ignore out-of-range glyphIDs
We don't want to support out-of-range glyphIDs in cmap or GSUB.
Explicitly drop them.
2013-12-04 23:07:55 -05:00
Behdad Esfahbod
ebcad976c8 [subset] Minor 2013-12-04 23:00:52 -05:00
Behdad Esfahbod
57fb7264a0 [subset] Minor 2013-12-04 21:56:53 -05:00
Behdad Esfahbod
6bd43247f2 [subset] Add allowVID option to load_font()
Not enabled right now.
2013-12-04 21:34:05 -05:00
Behdad Esfahbod
dc87372c88 Use True/False instead of 1/0 2013-12-04 21:28:50 -05:00
Behdad Esfahbod
19d7cf2b5f [subset] Handle non-existing ScriptList
As seen in CinzelDecorative-Regular.otf.
2013-12-04 21:13:11 -05:00
Behdad Esfahbod
9e6ef94b55 Use "is None" instead of "== None"
The latter hits the __eq__ method and can fail because we now
do not allow comparing objects of different types.

For example, was failing subsetting Andika-R.ttf.
2013-12-04 16:35:10 -05:00
Behdad Esfahbod
153ec40209 Fix a few pychecker warnings
Fixes https://github.com/behdad/fonttools/issues/58
2013-12-04 01:15:46 -05:00
Behdad Esfahbod
1f26289013 [subset] py23 Use new-style classes 2013-11-28 18:53:30 -05:00
Behdad Esfahbod
b21c9d36ee [subset] py23 fix str usage 2013-11-28 17:32:42 -05:00
Behdad Esfahbod
a030a0d25f [subset] py23 from __future__ import division and adjust divisions 2013-11-27 17:46:15 -05:00
Behdad Esfahbod
cfeafd79cd [subset] py23 from __future__ import print_function 2013-11-27 17:27:35 -05:00
Behdad Esfahbod
36e20ff473 [subset] py23 import 2013-11-27 15:25:00 -05:00
Behdad Esfahbod
6890d050ef [subset] 2to3 --fix=dict with manual cleanup 2013-11-27 14:01:45 -05:00
Behdad Esfahbod
4cd467c853 [subset] 2to3 --fix=print with manual fixup 2013-11-27 04:57:06 -05:00