3682 Commits

Author SHA1 Message Date
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
Sascha Brawer
40474f1aab Distinguish value records format A from format B with zero values
Fixes https://github.com/fonttools/fonttools/issues/848.
2017-02-16 13:53:55 +01:00
Cosimo Lupo
1bc7053978 Merge pull request #845 from mashabow/subset-notdef-fdselect
[subset] Set the correct glyph width for blank .notdef
2017-02-15 22:24:23 -08:00
Masaya Nakamura
7ac8c32274 [Tests/subset] Add a test case for .notdef glyph width (#845) 2017-02-16 13:58:49 +09:00
Masaya Nakamura
87527d7261 [subset] Don't assign the unused second item of getItemAndSelector() to sel
It was confusing, since `sel` is used for FDSelect elsewhere in this script.
2017-02-16 11:41:44 +09:00
Masaya Nakamura
4d315892af [subset] Set the correct glyph width for blank .notdef
`font.FDSelect[i]` returns a GID, not an index of `font.FDArray`.

Before this commit `.notdef` might have wrong glyph width in CharStrings,
if its fdSelectIndex is not 0 in the input font.
2017-02-16 11:09:52 +09:00
Cosimo Lupo
43914430f4
Bump version: 3.7.1 → 3.7.2.dev0 2017-02-15 12:56:30 -08:00
Cosimo Lupo
c10bc762b7
Release 3.7.1 2017-02-15 12:55:48 -08:00
Cosimo Lupo
f1673e46dd
[psCharStings] remove unused T2OutlineExtractor.hints attribute 2017-02-15 11:10:34 -08:00
Cosimo Lupo
830cb1a6f6
Update changelog 2017-02-15 11:01:51 -08:00
Cosimo Lupo
f7a5d83cbb
[Tests/subset] make the test pass: we can now drop empty subroutines! 2017-02-15 01:19:12 -08:00
Behdad Esfahbod
65f0f98dba [subset.CFF] Drop empty subroutines 2017-02-15 01:17:26 -08:00
Behdad Esfahbod
079e10f31b [subset] Refactor code; hopefully didn't break it! 2017-02-15 00:52:55 -08:00
Cosimo Lupo
489db26da9
[Tests/subset] we still don't remove empty subroutines; adjust test data 2017-02-15 00:42:45 -08:00
Behdad Esfahbod
8f03413aef [subset] Fix for 1ec6d30aa9b03ee40148ae8115848340ffd852a1 2017-02-15 00:33:37 -08:00
Cosimo Lupo
1ec6d30aa9
[Tests/subset] add failing test case: we still drop drawing instructions before the first hintmask... 2017-02-15 00:22:49 -08:00
Cosimo Lupo
aca7dd7db3
[subset] we don't remove empty subroutines (yet) 2017-02-15 00:17:50 -08:00
Behdad Esfahbod
32f2d6c3e8 Revert "[subset] Minor; towards refactoring"
This reverts commit 2348522167838132c06b0eecbce9c77e2ca07d02.
2017-02-14 23:52:38 -08:00
Behdad Esfahbod
684cdeef41 Revert "[subset] Minor; towards refactoring"
This reverts commit 697811178503edefd7c1f00ae8a8dcebf32d8fbb.
2017-02-14 23:52:24 -08:00
Behdad Esfahbod
2a171c852b Revert "[subset] Minor; towards refactoring"
This reverts commit 17dfafdd158c59cb34d15a2dd2f37db1d6f7b68b.
2017-02-14 23:52:18 -08:00
Behdad Esfahbod
17dfafdd15 [subset] Minor; towards refactoring 2017-02-14 23:49:02 -08:00
Behdad Esfahbod
6978111785 [subset] Minor; towards refactoring 2017-02-14 23:44:17 -08:00
Behdad Esfahbod
2348522167 [subset] Minor; towards refactoring 2017-02-14 23:42:45 -08:00
Behdad Esfahbod
e4a853466d [subset] Adjust comment for previous fix 2017-02-14 23:25:37 -08:00
Cosimo Lupo
3a8f976cfe
[subset_test] add two test cases for subr starting with hintmask, one acting as implied vstem, the other occurring after path drawing operations 2017-02-14 23:00:17 -08:00
Cosimo Lupo
3ae59d3dce
[subset] minor: use for ... else 2017-02-14 22:56:48 -08:00
Behdad Esfahbod
0fd22766b8 Merge pull request #709 from anthrotype/cff-dehint-2
[subset] second attempt at fixing --no-hinting with CFF
2017-02-14 22:05:25 -08:00
Sascha Brawer
e97b864cfc [feaLib] Use assertEqual instead of deprecated assertEquals
On Python 3, any use of `assertEquals` logs a deprecation warning.
2017-02-14 20:20:22 +01:00
Sascha Brawer
eac7ef89c0 [feaLib] Make nameid parsing more robust
We now correctly handle nameid statements with surrogate pairs and
old-style macOS-encoded names (provided that fonttools supports the
specified encoding).

Resolves https://github.com/fonttools/fonttools/issues/842.
2017-02-14 14:28:10 +01:00