10930 Commits

Author SHA1 Message Date
Cosimo Lupo
e54fced0b9 Merge pull request #424 from benkiel/patch-2
Update doc
2015-12-07 19:27:17 +00:00
Ben Kiel
e53d2068ca Update doc
Added text for woff2
2015-12-07 13:26:16 -06:00
Cosimo Lupo
5cf297ca44 xmlReader_test: test ProgressPrinter and reading from path vs file object 2015-12-07 19:26:04 +00:00
Cosimo Lupo
af62ebf2b6 ttLib: rename 'fileName' arg to 'fileOrPath' in importXML function for consistency with saveXML method 2015-12-07 18:26:48 +00:00
Cosimo Lupo
112b9ba8ff Merge pull request #423 from anthrotype/remove-win-exe
remove old 'Windows' folder as no longer required
2015-12-07 16:40:11 +00:00
Cosimo Lupo
0ea7e800c6 remove old 'Windows' folder as no longer required
Since we now use setuptools to create platform-specific console scripts,
(including *.exe for Windows) we no longer need Win-only instructions nor
extra files.

Thanks @twardoch for his contribution.
2015-12-07 16:35:20 +00:00
Sascha Brawer
46983f573f [feaLib] Parse GPOS type 2 format A and B, and ValueRecord format D
This is just the change on the parser. Building the output tables
is still marked as a TODO.
2015-12-07 17:18:18 +01:00
Cosimo Lupo
e6b47d61c9 cu2qu.rf: only get fist item returned from curve_to_quadratic, ignore approx error
curve_to_quadratic and curves_to_quadratic now return a (spline, error) tuple.
2015-12-07 15:09:26 +00:00
Cosimo Lupo
4dffdb7dd7 cu2qu.__init__: return (spline[s], error[s]) tuple from curve[s]_to_quadratic; raise exception if no approximation is found; ensure returned spline is a list of tuples 2015-12-07 15:09:26 +00:00
Behdad Esfahbod
5133e3777e Undo accidentally commit changes 2015-12-07 15:15:51 +01:00
Cosimo Lupo
bc690a565d Merge pull request #422 from anthrotype/vdmx-sort
[V_D_M_X_] sort records by yPelHeight when writing toXML
2015-12-07 11:15:10 +00:00
Behdad Esfahbod
a219c6daff Write out XML 2015-12-07 12:12:11 +01:00
Cosimo Lupo
983c21c745 [V_D_M_X_] sort records by yPelHeight when writing toXML 2015-12-07 11:07:56 +00:00
Behdad Esfahbod
c65c16d3f6 Fix previous commit
Humm, no idea how I had committed it locally before.
2015-12-07 12:05:24 +01:00
Behdad Esfahbod
5a08924075 Add high-level API for LigatureSubst
Ala MultipleSubst and AlternateSubst.  For now, just support compiling it.
2015-12-07 12:01:42 +01:00
Sascha Brawer
83dbae1da5 [feaLib] Do not emit any Value if ValueFormat is 0 2015-12-07 11:47:55 +01:00
Sascha Brawer
117683680e [feaLib] Emit SinglePos (GPOS type 1) in format 2 when this is more compact 2015-12-07 11:39:14 +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
Sascha Brawer
1d4fb7925b Merge pull request #421 from moyogo/fealib-device
[feaLib] make Device Table from device tuples
2015-12-05 15:28:30 +01:00
moyogo
c01b956ae7 [feaLib] make Device Table from device tuples 2015-12-05 08:56:46 +00:00
Behdad Esfahbod
1ab0631ba4 Merge pull request #16 from googlei18n/py23
Use __future__ imports to ease Python2/3 compat
2015-12-04 22:44:53 -08:00
jamesgk
a79fb041a2 Use __future__ imports to ease Python2/3 compat 2015-12-04 13:07:32 -08:00
moyogo
38b335e131 feaLib: misnamed function in builder_test.py 2015-12-04 16:56:58 +00:00
Sascha Brawer
5644da31d2 [feaLib] Parse device tables 2015-12-04 17:10:20 +01:00
Sascha Brawer
46c76dbf1f [feaLib] Parse ValueRecord format C
However, not sure how to build the otTables object graph for emitting
GPOS tables with device values; the current code thus silently strips
off any device values. Left a TODO comment for implementing this.
2015-12-04 15:49:04 +01:00
Sascha Brawer
b99f1c9af4 [feaLib] Implement GPOS type 1, Single Adjustment Positioning 2015-12-04 12:22:01 +01:00
Sascha Brawer
f45fab8c3a [feaLib] Sort GSUB glyph coverage tables by glyph ID
Before this change, feaLib would sort coverage tables by glyph name,
which is against the OpenType specification.  The current unittests
happen to use only glyphs where the ordering is identical whether
sorting by name or by ID; but I am about to add unittests (for GPOS)
where the ordering is different.

The ordering cannot be enforced by otTables because otTables does
not have access to the font's glyph order; therefore, the sorting
needs to happen inside feaLib.
2015-12-04 11:11:17 +01:00
Behdad Esfahbod
aba3051aac [benchmark] Print time in micro-seconds 2015-12-03 18:13:27 -08:00
Behdad Esfahbod
1665774752 Merge pull request #15 from googlei18n/optimize
Remove Point class and only use built-ins
2015-12-03 17:53:13 -08:00
Sascha Brawer
cab0067c7e [feaLib] Implement GSUB LookupType 8: Reverse chaining single substitutions 2015-12-03 13:05:42 +01:00
jamesgk
72ebeb1085 Add license to benchmark script 2015-12-01 17:28:19 -08:00
jamesgk
3d4a7872ab Add a benchmarking suite for curve/s_to_quadratic 2015-12-01 17:13:14 -08:00
jamesgk
a787cd2daf Pass tuples to curves_to_quadratic in rf module 2015-12-01 17:12:30 -08:00
jamesgk
561bed0ea0 Remove Point class and only use built-ins
Using built-in types (mostly tuples) seems to cut the running time
overall by about one half. Spelling out linear interpolation in the
bezier_at functions actually cuts the running time by another 10%,
but I'm not sure if it's worth it given that this code looks a bit
nicer.
2015-12-01 13:22:24 -08:00
Behdad Esfahbod
bb79a8bf62 Merge pull request #14 from googlei18n/api
Move geometry module to __init__
2015-12-01 13:03:08 -08:00
jamesgk
97ce534d7b Move geometry.py to __init__.py 2015-12-01 12:30:31 -08:00
jamesgk
ebf1573564 Remove __init__.py (will be replace by geometry.py) 2015-12-01 11:04:48 -08:00
Cosimo Lupo
9f0aa03aec Merge pull request #402 from khaledhosny/subset-colr
[subset] Support subsetting MS color tables
2015-12-01 08:15:53 +00:00
Cosimo Lupo
f06dd27c25 Merge pull request #417 from khaledhosny/fix-setup.py
Fix setup.py to install fontTools.subset
2015-12-01 08:02:47 +00: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
Khaled Hosny
b39077b64e Fix setup.py to install fontTools.subset
Broken since 29d7edf76f9ca888d120f2018e08e2b337ba7cf8.
2015-12-01 11:58:20 +04:00
Sascha Brawer
152dff4361 [feaLib] Implement GSUB chain substitution rules 2015-11-30 15:02:09 +01:00
Behdad Esfahbod
fdd84fad88 Merge pull request #12 from googlei18n/error-em
Specify tolerance in em through `max_err_em`
2015-11-24 15:38:22 -06:00
Behdad Esfahbod
a9d364ddcb Add URL to spec 2015-11-24 15:01:11 -06:00
Behdad Esfahbod
24f088110e Rename from FontWorker to FontDame
Spec is also available now, at:
https://github.com/Monotype/OpenType_Table_Source/
https://rawgit.com/Monotype/OpenType_Table_Source/master/otl_source.html
2015-11-24 15:00:15 -06:00
jamesgk
bf6b2d9f7e Specify tolerance in em through max_err_em
This way, the `max_err` parameter is consistent with the other
functions (being in font units).
2015-11-24 12:52:03 -08:00
Cosimo Lupo
196254ae1e Merge pull request #414 from anthrotype/py23-import-fix
[py23] fix ImportError when trying to import names when already defined
2015-11-23 12:07:41 +00:00
Cosimo Lupo
2eda1785f6 [py23] fix ImportError when trying to import unichr, basestring or unicode when already defined
When one does `from fontTools.misc.py23 import *`, everything seems to work fine.

However, linters will complain when one uses the asterisk to import all names from a module, since they can't detect when names are left undefined -- asterisks are greedy and will eat all names.

If one avoids the asterik and attempts to import explicitly, like in `from fontTools.misc.py23 import basestring`, the problem then is that, if `py23` does not re-define the name -- e.g. under python2 `basestring` or `unicode` are built-ins -- then the import statement raises `ImportError`.

The same happens for the `unichr` function on a "wide" Python 2 build (in which `sys.maxunicode == 0x10FFFF`).

Now, to work around this, we need to re-assign those built-ins to their very same names. This may look silly, but at least it works.
2015-11-23 12:02:12 +00:00
James Godfrey-Kittle
f82e320395 Merge pull request #5 from googlei18n/error-em
Specify max error in em instead of font units
2015-11-20 14:40:07 -08:00