1727 Commits

Author SHA1 Message Date
Miguel Sousa
306882a00a [tests] Change hhea and vhea table version from float to hex to mute fontTools warnings 2017-02-28 16:35:13 -08:00
Miguel Sousa
d1f717ca16 [varLib.build] Test case and test result 2017-02-28 12:15:51 -08:00
Miguel Sousa
67e1945690 [varLib.build] ttx test files.
These originated from TTFs that were built from the test UFO masters using fontmake v1.2.0 with the command `fontmake -m BuildTest.designspace -o variable`
2017-02-28 12:13:20 -08:00
Miguel Sousa
979e8657a6 [varLib.build] designspace and ufo test files 2017-02-28 08:46:27 -08:00
Miguel Sousa
951b53de4c fix test after filename changes 2017-02-28 05:40:10 -08:00
Miguel Sousa
6f3be0b8f3 filename changes 2017-02-28 05:38:58 -08:00
Miguel Sousa
a1c6bc46f1 [designspace] Test for empty elements 2017-02-28 05:17:42 -08:00
Bo Song
b45fcf0fd6 Change gasp merge logic to 'first' (#862)
* change gasp merge logic to first

* fix typo

* add comment

* fix typo
2017-02-27 19:34:48 +00:00
Cosimo Lupo
ba44e64108
[designspace] rename 'masters' to 'sources', like in original .designspace document
I don't see why our parser should call this element differently than its official name.
2017-02-27 16:21:35 +00:00
Cosimo Lupo
ae58d3872c Merge pull request #864 from miguelsousa/pr857-followup
Followup to PR #857
2017-02-26 16:44:18 +00:00
Miguel Sousa
f061231049 [varLib] Make designspace.load() return a dictionary instead of a tuple 2017-02-26 07:49:44 -08:00
Miguel Sousa
380a6cd56b [varLib] Update designspace test case 2017-02-25 20:46:51 -08:00
Miguel Sousa
aed9caf964 [varLib] Add ‘axes’ element to designspace test file 2017-02-25 20:44:35 -08:00
Cosimo Lupo
01ed5a43e7 data/lookupflag.{fea,ttx}: add tests for duplicate glyphs in MarkAttachClass and MarkGlyphSets 2017-02-26 10:48:54 +08:00
Denis Moyogo Jacquerye
891405fd68 TupleVariation: round deltas before encoding (#861)
* TupleVariationTest.test_compileDeltaValues(): also test floats

* TupleVariation: round deltas before encoding

Python 3 was raising 'struct.error: required argument is not an integer' and Python 2 was truncating when deltas are floats
2017-02-24 08:58:41 -08: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
justvanrossum
c5aa43238f Make sure to load the 'head' table when recalculating the time stamp. Fixes #847. 2017-02-21 13:45:50 +01:00
Cosimo Lupo
34fec90630
[subset_test] verify that --recal-timestamp actually works
Closes #847
2017-02-19 20:12:22 -08: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
Masaya Nakamura
7ac8c32274 [Tests/subset] Add a test case for .notdef glyph width (#845) 2017-02-16 13:58:49 +09:00
Cosimo Lupo
f7a5d83cbb
[Tests/subset] make the test pass: we can now drop empty subroutines! 2017-02-15 01:19:12 -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
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
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
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
Sascha Brawer
b22df7ff48 [feaLib]Escape nameid strings when writing feature files
https://github.com/fonttools/fonttools/issues/780
2017-02-14 11:02:12 +01:00
Sascha Brawer
7cf22d01ae [feaLib] Move test file include0.fea into test data subdirectory
Move the other include files into a new subdirectory inside `data`.
Mention the changed behavior of include statements in NEWS.
See https://github.com/fonttools/fonttools/pull/838.
2017-02-13 09:19:41 +01:00
Miguel Sousa
75133fc4d1 [feaLib] Make include() work like makeotf 2017-02-13 08:42:03 +01:00
Sascha Brawer
706858646a Preserve ordering of glyph alternates when round-tripping through TTX
Also fixes a bug where glyph alternates in MTI feature files were
wrongly sorted by glyph name. After this change, the output is using
the same ordering as in the input MTI feature file.

Fixes https://github.com/fonttools/fonttools/issues/833.
2017-02-11 17:08:56 +01:00
Sascha Brawer
b31ed09421 Support glyph names with dashes
The OpenType Feature File Syntax has been changed to support dashes:
https://github.com/adobe-type-tools/afdko/issues/152

Resolves https://github.com/fonttools/fonttools/issues/559.
Needed for https://github.com/googlei18n/fontmake/issues/249.
2017-02-11 15:57:17 +01:00
Cosimo Lupo
c234e3606c
[data/expect_no_hinting_TTF.ttx] adjust data using empty instructions elements 2017-01-25 15:35:16 +00:00
Cosimo Lupo
99303de5c5
[subset_test] add tests for desubroutinize and no-hinting options using Lobster subset
The following test cases are expected to fail because the current implementation of drop_hints
also strips the charstrings' advance widths:

Tests/subset/subset_test.py::SubsetTest::test_no_hinting_CFF
Tests/subset/subset_test.py::SubsetTest::test_no_hinting_desubroutinize_CFF
2017-01-25 15:31:54 +00:00
Cosimo Lupo
8df708269f
[loggingTools_test] give more time to TimerTest::test_split
timers can be capricious...

https://travis-ci.org/fonttools/fonttools/jobs/195116432#L1265-L1278
2017-01-25 10:07:09 +00:00
Cosimo Lupo
385c6d8f4f
[data/expect_keep_colr.ttx] adjust empty instructions elements in test data 2017-01-24 18:34:55 +00:00
Cosimo Lupo
e8527bcb48
[data/TestCLR-Regular.ttx] revert unnecessary changes from 337dd1d 2017-01-24 16:39:02 +00:00
Jens Kutilek
a8151d46c2 Revert "Now with correct test program file"
This reverts commit ff9c046299ae016adf19a8e327efbe3093d11c33.
2017-01-24 16:30:13 +01:00
Jens Kutilek
5d3b4eb4c0 Tell XMLWriter what newline character to use 2017-01-24 16:23:06 +01:00
Jens Kutilek
ff9c046299 Now with correct test program file 2017-01-24 16:22:45 +01:00
Jens Kutilek
2135ef25e6 Revert "No newline at end of file"
This reverts commit c043cfbb4698b7cb54fe236b9fed52e5857776ab.
2017-01-24 16:06:10 +01:00
Jens Kutilek
c043cfbb46 No newline at end of file 2017-01-24 16:01:44 +01:00
Jens Kutilek
22391398b0 Fix merge conflict 2017-01-24 15:46:40 +01:00