426 Commits

Author SHA1 Message Date
Sascha Brawer
2011ccf6ec [morx] Clean up compilation of AAT action tables; add more tests 2018-09-24 20:15:54 +02:00
Sascha Brawer
4a1871ff62 [morx] Support AAT action type to insert glyphs 2018-09-24 18:14:01 +02:00
Khaled Hosny
baf4f560bb [feaLib] Skip noop class PairPos subtables
If Coverage is None then the subtable is a noop that does nothing and
there is no point in building it. As a bonus, it makes OTS happy since
it will reject subtables where coverageOffset is NULL (0) and the spec
does not say whether this is allowed or not.
2018-09-16 12:23:34 +02:00
Cosimo Lupo
9536541aba
feaLib: demote warning about redefined kern pairs to debug message
https://github.com/fonttools/fonttools/issues/1147#issuecomment-421539956
2018-09-15 10:09:49 +02:00
Cosimo Lupo
0431360cf2
Merge pull request #1314 from anthrotype/varlib-feature-variations
[varLib] implement building GSUB FeatureVariations from DesignSpace rules
2018-09-14 17:25:44 +02:00
Cosimo Lupo
af8c461c92
varLib_test: add test case for GSUB FeatureVariations 2018-09-14 16:51:25 +02:00
Jens Kutilek
7c8077a63d Add glyf flags bit6 to ttx output (#1316)
* Implement glyf outline flags bit 6 when decompiling/compiling

* Add test data for outline flag bit 6

* Rename flags, use bitwise OR for setting flag bit

* Remove unneeded code
2018-09-14 15:27:32 +02:00
Cosimo Lupo
ac9790ca89
travis: 'brew install python' on macOS, use generic py3 tox env
formula is now named just 'python'.
For the homebrew version installed on Travis (which we don't
autoupdate) we *should* get python3.6 with this currently.

It might be the case that python3 is already installed on
Travis macOS image, but need to check.

We call tox with 'TOXENV=py3' so that when Travis updates its homebrew,
we'll get python3.7 automatically.

Finally, use virtualenv instead of venv on mac to fix tox bootstrapping issue

https://github.com/pypa/virtualenv/issues/1051
https://github.com/pre-commit/pre-commit/issues/631
https://travis-ci.org/fonttools/fonttools/jobs/427582922#L214

fixup
2018-09-12 12:09:43 +02:00
Cosimo Lupo
3c59ffda5e
Test: raise DesignSpaceDocumentError when no axes defined 2018-09-11 18:33:53 +02:00
Martin Hosken
fecf163d79 Revert spec4h2.fea 2018-09-07 15:46:29 +07:00
Martin Hosken
e048c3772c Revert comment changes to spec4h1.fea 2018-09-07 15:43:53 +07:00
Martin Hosken
59a4e934ee Get the fix we want 2018-09-07 15:37:33 +07:00
Martin Hosken
299ae2fb0b Fix tests 2018-08-17 11:51:05 +07:00
Cosimo Lupo
83f9156f8d
Merge pull request #1302 from moyogo/fix-subtable-break
Fix subtable break
2018-07-26 11:16:58 +01:00
Denis Moyogo Jacquerye
fdf96904b3 feaLib tests: update PairPos subtable tests
The subtable break is being forced after every pos, it shouldn’t.
2018-07-26 11:06:17 +01:00
Cosimo Lupo
68951b7c3d
feaLib: when name table not selected, skip building featureNames blocks
ufo2ft feature writer calls feaLib builder with tables=[GSUB] first, to run closure
over glyph substitutions; if the GSUB features contains 'featureNames' blocks, then
an AssertionError will be raised; in this case, we can simply skip building the
FeatureParams tables as we haven't build the name records they point to.
2018-07-26 10:51:37 +01:00
Cosimo Lupo
8991f2c097
Merge pull request #1300 from anthrotype/explicit-subtable-break
support explicit "subtable" breaks in kerning lookups
2018-07-25 11:58:26 +01:00
Kunihiko Sakamoto
35377bc93b Fix test 2018-07-25 18:22:18 +09:00
Cosimo Lupo
33084b74cf
Tests: add tests for 'subtable' breaks 2018-07-24 17:14:39 +01:00
Cosimo Lupo
d3229d5777
feaLib: ensure languagesystems using 'DFLT' script tag precede all others
https://github.com/fonttools/fonttools/pull/1292#issuecomment-407427544

this is to match makeotf's behavior

https://github.com/adobe-type-tools/afdko/pull/498/files#diff-17824930b3cdfb707ae56e1f42bccec6R2305
2018-07-24 16:17:23 +01:00
Cosimo Lupo
1740d18584
Merge pull request #1292 from silnrsi/bugfix2
More depths to allowing languages in DFLT
2018-07-24 15:24:50 +01:00
Cosimo Lupo
38566f3a30
subset_test: minor 2018-07-24 12:17:59 +01:00
Cosimo Lupo
0df51c58e0
otTables_test: add unit test for splitMarkBasePos 2018-07-19 17:56:35 +01:00
Cosimo Lupo
a526b7170c
tests: fix expected results after Unicode 11 update
fixes https://github.com/fonttools/fonttools/issues/1291
2018-07-12 11:35:16 +01:00
Martin Hosken
17de50c172 Add DFLT script languagesystem test 2018-07-09 20:11:57 +01:00
Martin Hosken
6d6b9c69d4 Fix tests 2018-07-09 17:02:48 +01:00
Miguel Sousa
8d7774a3e8 [pscharstrings] Optimize the charstring's bytecode
by encoding as integers all float values that have no decimal portion.

This optimization is expected to reduce the file size of CFF2 fonts that have intermediate masters.

Related to https://github.com/adobe-type-tools/afdko/issues/444

Many thanks to @cjchapman for the help on the fixed point math
2018-06-29 09:54:00 -07:00
Martin Hosken
29d67a90c5 Update tests to not require removed assertion 2018-06-20 09:57:07 +01:00
Cosimo Lupo
4c0dbd1515
Merge pull request #1276 from anthrotype/mutator-wght-wdth-slnt
WIP [mutator] set usWeightClass, usWidthClass and italicAngle
2018-06-19 17:23:56 +01:00
Cosimo Lupo
d9d30c819a
loggingTools: move here the LastResortLogger from py23
and add a small test
2018-06-19 16:54:50 +01:00
Cosimo Lupo
8c597b5375
mutator: round to closest width class
this is the mapping between the half of each percentage intervals and
the associated usWidthClass:

{56.25: 1,
 68.75: 2,
 81.25: 3,
 93.75: 4,
 106.25: 5,
 118.75: 6,
 137.5: 7,
 175.0: 8}

Notice how wdth=80 (in the adjusted test case) will fall in width class
3, instead of 4, because it is < 81.25, thus closer to the nominal 75
than to 87.5.
2018-06-19 14:16:17 +01:00
Cosimo Lupo
8fcbf78d8b
Tests: adjust expected usWeightClass and usWidthClass 2018-06-18 19:41:03 +01:00
Cosimo Lupo
e94cd9f373
Merge pull request #1275 from moyogo/feaLib-subtable
[feaLib] asFea() shouldn’t fail when `subtable` is used
2018-06-18 15:14:38 +01:00
Behdad Esfahbod
1801248938 [varLib.models] Fix model resolution
Oops.  Was introduced when I last changed modeling.

The problem was, for checking that a previous master m is outside the current
influence box of the current master, I was doing "not (lower < m[loc] < upper)".
This is wrong, where lower,peak,upper is the support of previous master.
This fails if lower == peak == m[loc], or m[loc] == peak == upper.

Fixes https://github.com/fonttools/fonttools/issues/1269#issuecomment-397655016
2018-06-16 14:07:18 -04:00
Denis Moyogo Jacquerye
632192804f Add PairPosSubtable test 2018-06-15 11:10:49 +01:00
Cosimo Lupo
0337fc92fc
Tests: adjust to use new otRound function 2018-06-14 17:49:37 +01:00
Cosimo Lupo
f9f06ecc10
allow to run tests when zopfli/brotli are not installed 2018-06-12 11:00:40 +01:00
Cosimo Lupo
ae69133924
ttGlyphPen: gracefully handle missing components while decomposing 2018-06-11 18:40:11 +01:00
Cosimo Lupo
7a38a711be
ttx_test: last version digit may contain '\n' char
fixes https://travis-ci.org/fonttools/fonttools/jobs/390768657#L668
2018-06-11 14:15:18 +01:00
Cosimo Lupo
d9f7a26027
_g_l_y_f_test: test _checkFloat upgrades to double when overflowing short int 2018-06-07 15:40:50 +01:00
Cosimo Lupo
65eac8ef92
Merge pull request #1267 from fonttools/designspaceLib-checkDefault
designspaceLib remove checkDefault, checkAxes
2018-06-07 11:14:43 +01:00
Erik van Blokland
e4c90b9afe WIP uncomment test for conditions without min or max.
Add _axesAsDict to the test because there it is needed.
2018-05-30 22:26:59 +02:00
Erik van Blokland
855a475ad2 WIP removed test for incomplete rules. Added test for stray conditions. Removed high unicode character from lib test. Read stray unwrapped conditions, put them in a conditionset. 2018-05-27 19:18:13 +02:00
Erik van Blokland
8582dbdd2a WIP. Some comments. 2018-05-27 09:50:00 +02:00
Erik van Blokland
16cba5ad81 WIP Remove _locationFromElement. Single method for newDefaultLocation. Split some of the tests into smaller things. Add some thoughts to normaliseLocation and why this needs a separate method from the one in varLib. 2018-05-25 11:43:58 +02:00
Erik van Blokland
9d91c82bbe WIP test documentLib. Add a warning if a findDefault can't find a suitable location. 2018-05-24 21:49:33 +02:00
Cosimo Lupo
01173c4599
Merge pull request #1261 from chrissimpkins/ttx-tests
Add ttx tests
2018-05-23 20:13:22 +01:00
Erik van Blokland
086de222fa WIP axes are compulsory, so don't accomodate missing axes. Raise error if document is missing axes.
We know what the default location is before we start reading the masters and there is no guessing.
findDefault() method: default master is at all default values of all axes, or if that fails, the master with the copyInfo flag.
Warn if a location contains an axis that is not defined in the axes element. Otherwise ignore this value, no guessing.
Remove rulesToFeature() function.
2018-05-23 13:19:23 +02:00
Chris Simpkins
b52ddaddeb convert new ttx tests to py.path.local path joins and file checks 2018-05-22 15:13:51 -04:00
Chris Simpkins
f2eb328125 parametrize ttCompile timestamp tests 2018-05-22 07:50:23 -04:00