320 Commits

Author SHA1 Message Date
Cosimo Lupo
c4d2ebca66 remove deprecated use of 'quiet' option in test modules 2016-02-01 13:39:39 +00:00
Cosimo Lupo
7ac65613eb [subset] add --with-zopfli option; set 'canonical_order' to None
'canonical_order' default value was set to False in the subsetter. However,
the meaning of the related 'reorderTables' argument in TTFont.save method has changed
with commit 6ba67ab699d62962690a7a523c286ebf0c8b0ae4.
When the latter is set to False, the original input font's table order is "kept": which
still means doing some sort of reordering. If one wishes to avoid any kind of reordering,
reorderTables needs to be set to None.
2016-01-31 14:50:04 +00:00
Cosimo Lupo
c5febaf1a5 [subset] remove custom Logger and use logging instead
The Subsetter class now uses a module-level 'log', and no longer uses
its own custom Logger. This has been removed, and its features replaced
by equivalents.

log.lapse() are replaced with Timer context manager/decorator (these should make clearer where the elapsed time starts/stops);

log.glyphs() is kept for convenience: it is bound dynamically to the logger instance instead of subclassing logging.Logger, as it's only
useful in here.

log.font() is replaced by `font.saveXML(sys.stdout)`.

A distinct sub-logger is configured for timing messages, to allow --timing option to be enabled independently from --verbose
2016-01-27 19:05:05 +00:00
Cosimo Lupo
ce5d230eef [subset] add --prune-unicode-ranges option (enabled by default) 2016-01-27 18:38:32 +00:00
Cosimo Lupo
ac56990aad replace all uses of codecs.open with py23.open 2016-01-26 15:45:27 +00:00
Khaled Hosny
279243202a [subset] Test MATH table 2016-01-23 23:09:22 +04:00
Khaled Hosny
0e1cc9fb73 [subset] Add support for MATH table 2016-01-23 23:00:30 +04:00
Behdad Esfahbod
0ec2911c47 [subset] Fix for f0eb7e98ca0642f17ac82433db8c957fffd6a9d3 2016-01-13 17:00:29 +00:00
Rod Sheeter
9927a91653 Remove change to _dict_subset (meant to be local/test only). Add a cmap fmt 0 to color font test file. 2015-12-09 13:32:35 -08:00
Rod Sheeter
905eb831b9 Add Google-style color font test and make _dict_subset more forgiving. 2015-12-09 13:05:16 -08:00
Cosimo Lupo
812609e90c [subset] fix logic of EBLC subsetting; avoid KeyError in EBDT subsetting 2015-12-09 09:42:15 -08:00
Rod Sheeter
9189d1a1f0 Experimental support for Google-style color bitmap fonts 2015-12-09 09:42:15 -08:00
Behdad Esfahbod
8128b509a4 [subset] Augment ContextHelper
As needed in my Monotype OpenType format parser.  I'm not using the object
directly from subset module, but pushing back my changes here, in the hope
that we move this object to ttLib proper soon.
2015-12-08 20:40:42 +01:00
Behdad Esfahbod
f129f658c9 [subset] Fix Options parsing
Fixes https://github.com/behdad/fonttools/issues/413
Test passes now.
2015-12-07 11:14:04 +01:00
Behdad Esfahbod
59b702c5ca [subset] Add test for subset.Options
Currently fails.
https://github.com/behdad/fonttools/issues/413
2015-12-07 11:13:44 +01:00
Khaled Hosny
301d2db812 [subset] Support subsetting MS color tables
Add support for subsetting COLR table.

The CPAL table does not need subsetting, but unused palettes should be
pruned, this is not implemented however as it depends on COLR table,
which in turn will not be updated after pruning CPAL.
2015-12-01 11:59:52 +04:00
Miguel Sousa
6db7d30ed9 [subset] Preserve the .notdef glyph width when removing its outlines 2015-11-13 17:43:22 -08:00
Miguel Sousa
270b155d45 [subset] First unit tests and test data 2015-11-13 17:40:17 -08:00
Miguel Sousa
51bd7e00b5 white space 2015-11-13 17:36:13 -08:00
Miguel Sousa
29d7edf76f [subset] mv subset.py subset/__init__.py 2015-11-13 17:36:02 -08:00