70 Commits

Author SHA1 Message Date
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
Behdad Esfahbod
c2e2e835ec [subset] 2to3 --fix=idioms 2013-11-27 04:15:27 -05:00
Behdad Esfahbod
b466efef28 [subset] 2to3 --fix=xrange 2013-11-27 03:34:35 -05:00
Behdad Esfahbod
553c3bbe4e [subset] 2to3 --fix=funcattrs 2013-11-27 02:24:11 -05:00
Behdad Esfahbod
cc8fc781c4 [subset] Add TODO item 2013-11-26 22:53:04 -05:00
Behdad Esfahbod
d214f20a51 [subset] Keep features with FeatureParams 2013-11-26 17:42:13 -05:00
Behdad Esfahbod
33378fde46 [subset] Minor 2013-11-26 17:41:37 -05:00
Behdad Esfahbod
05da970fec Don't renumber MarkGlyphSetsDef 2013-11-25 05:23:07 -05:00
Behdad Esfahbod
9fe4eefb1c [subset] Drop GSUB/GPOS main list items if empty 2013-11-25 04:28:37 -05:00
Behdad Esfahbod
5aea27dae3 [subset] Support GDEF MarkGlyphSetsDef 2013-11-25 04:19:42 -05:00
Behdad Esfahbod
98769437cd [subset] Fix against missing AttachList entries 2013-11-19 14:40:57 -05:00
Behdad Esfahbod
1117445fab [subset] Protect against missing rulesets
Fixes subsetting Molengo-Regular.ttf.
2013-11-18 20:20:49 -05:00
Behdad Esfahbod
7e97247925 [subset] Handle inexistent feature / lookup lists 2013-11-15 17:57:15 -05:00
Behdad Esfahbod
fe6bc4c7de [subset] Don't drop hinting info by default
Most people expect hinting to be preserved, and the CFF hint-stripper
is slightly buggy right now.
2013-11-02 11:10:23 +00:00
Behdad Esfahbod
2a70f4a45f [subset] Fix CFF hint-stripping
Was causing OTS failure when subsetting 'apple' glyph of
InformaPro-Light.otf for example.
2013-10-28 15:18:07 +01:00
Behdad Esfahbod
4d99d14dec [subset] Don't produce empty BlueValues
OTS didn't like it.
2013-10-28 13:15:08 +01:00
Behdad Esfahbod
a6241e6205 [subset] Retain cmap table even if empty
Since it's a required table.
2013-10-28 13:09:25 +01:00
Behdad Esfahbod
26560d238f [subset] Add TODO item 2013-10-26 22:03:35 +02:00
Behdad Esfahbod
98b60757ab [subset] Fix renumbering of (Chain)ContextFormat2
Jonathan says: "It was broken."
2013-10-14 17:50:06 +02:00
Behdad Esfahbod
3977d3e9e2 [subset] Typo 2013-10-14 17:50:06 +02:00
Behdad Esfahbod
e1a010c261 [subset] Fix AttributeError: 'NoneType' object has no attribute 'prune_hints' 2013-10-09 15:57:22 +02:00
Denis Jacquerye
bed5f61e13 * replace _dict() by dict() as in d73f22530ecadcbdfb2cbc5752df73367ae09a5a 2013-10-09 11:16:25 +02:00
Behdad Esfahbod
16fc323cc2 [subset] Drop CFF font-wide hinting values (bluezones, etc) 2013-09-30 15:10:01 -04:00
Behdad Esfahbod
9255d33f04 Remove stale comment 2013-09-27 16:38:39 -04:00