Behdad Esfahbod
0a2c5ef7ae
[symfont] Write generator code as main function in printPen() output
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
628b1c99aa
[symfont] Remove stale docstring
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
7bd0081368
[symfont] Remove printCache()
...
It wasn't updated, and not working, for ages.
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
087d865831
[symfont] Use dict.__missing__ trick for memoize
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
f13fbdae63
[symfont] Shuffle
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
03e8f2e461
[interpolatable] Minor
2017-02-21 12:01:10 -06:00
Behdad Esfahbod
65e5c257ed
[interpolatable] Remove stale commit and uncomment code
2017-02-21 12:01:10 -06:00
Cosimo Lupo
c2263c2e8f
[woff2_test] use bytes instead of unicode literals in struct format strings
...
This is for compatiblity with Python older than 2.7.7.
See https://bugs.python.org/issue19099
> Issue #19099 : The struct module now supports Unicode format strings.
https://hg.python.org/cpython/raw-file/f89216059edf/Misc/NEWS
2017-02-21 14:31:57 +00:00
Cosimo Lupo
fa51dff321
Merge pull request #854 from fonttools/require-head
...
explicitly require 'head' table in TTFont.save()
2017-02-21 13:52:10 +00:00
Cosimo Lupo
b39f3b613c
explicitly require 'head' table in TTFont.save()
...
it's implicitly required anyway, e.g. by ttx's ttCompile, maxp's recalc, OS/2 compile, etc.
2017-02-21 12:57:34 +00:00
justvanrossum
9de3d1a5ae
tweak comment
2017-02-21 13:47:30 +01:00
justvanrossum
c5aa43238f
Make sure to load the 'head' table when recalculating the time stamp. Fixes #847 .
2017-02-21 13:45:50 +01:00
Behdad Esfahbod
f3224d7d34
Move StatisticsPen into fontTools.pens.statisticsPen
2017-02-20 13:19:35 -06:00
Behdad Esfahbod
5cbfaa2792
[symfont] Change GlyphStatistics object into StatisticsPen
...
It's a simple pen now. To be moved to fontTools.pens next.
2017-02-20 13:02:52 -06:00
Behdad Esfahbod
c14aad81f4
[symfont] Rename
2017-02-20 12:46:55 -06:00
Behdad Esfahbod
5132bbe411
[symfont] Remove glyph perimeter from GlyphStatistics
...
It's not technically statistics the same way the other properties are, and
we have a separate pen for it, so remove. Goal is to turn GlyphStatistics
into a pen.
Also remove perimeter from interpolatable.py contour characteristics vector.
Shouldn't be needed, given all the stats we already include.
2017-02-20 12:36:15 -06:00
Behdad Esfahbod
a8db22a077
Move MomentsPen into fontTools.pens.momentsPen
2017-02-20 12:33:12 -06:00
Behdad Esfahbod
d9bccb8609
[symfont] Simplify GlyphStatistics; just compute everything upfront
...
Our MomentsPen is sooooooooo fast now, there's no point trying to
make it lazy.
2017-02-20 11:28:44 -06:00
Behdad Esfahbod
8712c20156
[perimeterPen] Use Gauss-Legendre instead of Lobatto-Gauss for qudratic
...
Uses one fewer point and is no uglier.
2017-02-20 11:16:12 -06:00
Behdad Esfahbod
6738305fb1
[perimeterPoint] Minor
2017-02-20 11:09:14 -06:00
Behdad Esfahbod
3d4bd76a76
[perimeterPen] Add Gauss-Lobatto implementation for quadratic Bezier as well
...
Is twice faster than the exact algorithm.
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
9f1067a991
[perimeterPen] Optimize Lobatto code
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
a94e0f4e52
[symfont] Remove unused CovarianceMatrix
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
da4b81e9ab
Add momentsPen as generated by symfont:printPen()
...
To be moved to proper place soon.
Using this in interpolatable.py makes the core of the computation over an
order of magnitude faster.
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
78637fb8c8
[symfont] Allow printing to files
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
afe3407ca5
[symfont] More
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
aaa950ea59
[symfont] Remove unused _Eigen method
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
c8a82dcfee
[symfont] Protect against math errors
...
Note that because our contours can overlap arbitrarily, our variance can end up
being negative, so, allow for that.
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
c8e68b2f4c
[interpolatable] Report bad contour in case of math error
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
c3b2e533e9
[interpolatable] Minor
2017-02-20 10:17:07 -06:00
Behdad Esfahbod
223ecc6453
Revert "[symfont] Make sure variance is never negative (float precision issue)"
...
This reverts commit 5c025c6a03cca2ebe3390671a81aaca28492e71c.
Investigating why I'm seeing non-negligible negative variance.
2017-02-20 10:17:07 -06:00
justvanrossum
4d92fcb9be
do a bare 'raise' so the original traceback doesn't get lost
2017-02-20 10:03:16 +01:00
Cosimo Lupo
34fec90630
[subset_test] verify that --recal-timestamp actually works
...
Closes #847
2017-02-19 20:12:22 -08:00
Cosimo Lupo
a226c4772b
[perimeterPen] move source encoding declaration to the first line
...
Otherwise I get this error on python2.7:
SyntaxError: Non-ASCII character '\xc2' in file perimeterPen.py on line 87, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
2017-02-19 20:08:57 -08:00
Behdad Esfahbod
3e74798499
[perimeterPen] Add Gauss-Lobatto quadrature approximation implementation
...
Is about 30 percent faster than recursive approach for the default .005
error tolerance. To be optimized more.
2017-02-19 16:08:21 -06:00
Behdad Esfahbod
8869a5b343
[symfont] Minor
2017-02-19 13:59:56 -06:00
Behdad Esfahbod
5f82438206
[symfont] Write code to write optimized code for green-derived pens
...
Eg.:
printPen('MomentsPen',
[('area', 1),
('momentX', x),
('momentY', y),
('momentXX', x*x),
('momentXY', x*y),
('momentYY', y*y)])
2017-02-19 02:50:06 -06:00
Behdad Esfahbod
aceabc032f
[symfont] Minor
2017-02-19 00:10:41 -06:00
Behdad Esfahbod
5c025c6a03
[symfont] Make sure variance is never negative (float precision issue)
2017-02-17 19:44:32 -06:00
Behdad Esfahbod
67fdff238b
[symfont] Optimize generated expression a bit
2017-02-17 19:44:32 -06:00
Cosimo Lupo
31d856b2f6
Bump version: 3.7.2 → 3.7.3.dev0
2017-02-17 17:02:52 -08:00
Cosimo Lupo
31b8c7f64f
Release 3.7.2
2017-02-17 17:02:03 -08:00
Cosimo Lupo
1ace6c6f50
Update changelog
2017-02-17 17:01:44 -08:00
Sascha Brawer
998512105e
[feaLib] Mention recently fixed bugs in NEWS
...
https://github.com/fonttools/fonttools/issues/514
https://github.com/fonttools/fonttools/issues/633
https://github.com/fonttools/fonttools/issues/848
2017-02-17 14:36:56 +01:00
Sascha Brawer
dc7bf89648
[feaLib] Test compiling zero values for SinglePos in vertical context
...
https://github.com/fonttools/fonttools/issues/633
2017-02-17 14:19:54 +01:00
Sascha Brawer
45c266441e
[feaLib] Add tests for zero values in contextual positioning
...
Specifically, contextual positioning statements with in-line single
positioning rules, in horizontal and in vertical contexts. For these
test cases, feaLib and makeotf produce the exact same output.
https://github.com/fonttools/fonttools/issues/633
2017-02-17 13:49:32 +01:00
Sascha Brawer
a2e7d96cf4
[feaLib] Merge SinglePos chain targets
...
Fixes https://github.com/fonttools/fonttools/issues/514 .
2017-02-17 12:49:12 +01:00
Sascha Brawer
fa69c64466
[feaLib] Add test case for class-based pair kerning with zero values
...
https://github.com/fonttools/fonttools/issues/633
2017-02-16 17:38:47 +01:00
Sascha Brawer
7c67e4a63d
[feaLib] Compile zero values to different formats based on context
...
If a zero value appears in a SinglePos statement, feaLib continues to
produce ValueRecords of format 0. But if a zero value appears in a
PairPos statement inside a horizontal compilation context, feaLib now
produces ValueRecords of format 4. Likewise, if a zero value appears
in a PairPos statement inside a vertical compilation context, feaLib
now produces ValueRecords of format 8.
The OpenType Feature Syntax specification is completely silent about this,
but the new behavior matches that of makeotf.
https://github.com/fonttools/fonttools/issues/633
2017-02-16 15:37:40 +01:00
Sascha Brawer
790c93d5cf
[feaLib] Test compilation of zero values in SinglePos statements
...
In context of SinglePos, makeotf compiles zero values to value records
of format 0. feaLib already does the same, but it's good to have tests
to make sure that this doesn't accidentally change.
https://github.com/fonttools/fonttools/issues/633
2017-02-16 13:59:53 +01:00