453 Commits

Author SHA1 Message Date
Cosimo Lupo
2524d76bdb [varLib/data] add UFO sources for Noto Sans subset
used to build the the interpolatable ttx files.

We can reuse it for other variation-related tests.
2017-08-16 18:46:38 +01:00
Cosimo Lupo
45c08d2858 [varLib_test] add tests for building avar table
this adds three new tests for varLib.build:

1) the input designspace contains a single 'weight' axis with <map>
   elements that modify the normalization mapping;

2) the input designspace contains two 'weight' and 'width' axes both
   with <map> elements, but the 'width' axis only contains identity
   mappings;

3) the input designspace contains two 'weight' and 'width' axes, but
   only one axis ('weight') has some <map> elements.

The master interpolatable ttx files for 'TestFamily3' are a subset of
Noto Sans containing only the letters to type the word "FontTools".
2017-08-16 18:44:18 +01:00
Cosimo Lupo
d89fcf93bc [varLib_test] add 'MVAR' to expected tables list
Note: the `expect_ttx` test is passing, but the `check_ttx_dump` which ensures the TTX dump is the same after saving and reloading the font, is currently failing, as the "ValueRecordSize" count is None

```
--- /Users/cosimolupo/Documents/Github/fonttools/Tests/varLib/data/test_results/Build.ttx
+++ /var/folders/7k/fl5q53lj51g0d8hxdkrx9_z80000gn/T/tmpoBCAua/tmp1.ttx
@@ -174,8 +174,7 @@
   <MVAR>
     <Version value="0x00010000"/>
     <Reserved value="0"/>
-    <ValueRecordSize value="8"/>
-    <!-- ValueRecordCount=2 -->
+    <ValueRecordSize value="None"/>
     <VarStore Format="1">
       <Format value="1"/>
       <VarRegionList>
```
2017-08-03 16:51:25 +01:00
Cosimo Lupo
4398e3b26b [Tests/varLib] fix up expected test data following latest IUP optimization algorithm 2017-07-27 17:06:32 +01:00
Cosimo Lupo
fd3cd6f367 Merge pull request #969 from fonttools/varlib-iup
Varlib iup
2017-05-24 11:44:59 +01:00
Behdad Esfahbod
877ac7540c Fix test after 0ed2df3f22bd4172e439b8deeb2070e3f62b26d3
interpolate_layout now accepts axis names in designspace name
format, NOT axis tags.
2017-05-23 00:31:15 -07:00
Jens Kutilek
92c8b3f754 Add test and test data for mutator with interpolated points 2017-05-18 16:40:33 -07:00
Sascha Brawer
017fa4e9c6 [fvar] Expose flags in XML
Fixes https://github.com/fonttools/fonttools/issues/932.
2017-05-02 00:51:44 +08:00
Behdad Esfahbod
f056c124e5 [misc.classifyTools] Make classification order stable
Sets don't have a welldefined comparison function, so sort them...

Not the most efficient implementation, but good enough.

Fixes https://github.com/fonttools/fonttools/issues/927
2017-04-18 15:57:14 -07:00
Miguel Sousa
6241ff77ec [varLib_test] no need for this test since axisMap parameter is no longer supported
test_varlib_build3_ttf() already covers the case of a .designspace without <axes> element
2017-04-13 00:58:23 -07:00
Behdad Esfahbod
968c25dd7f [varLib] Generate avar table
Fixes https://github.com/fonttools/fonttools/issues/916
2017-04-12 21:54:43 -07:00
Behdad Esfahbod
0fa41c14b9 [varLib] Check all master and instance locations are valid
Ie. they don't specify any unknown axes, and location is within
axis minimum/maximum.  We also allow master / instance locations
to not specify some axes, and we fill in the axis default for those.
2017-04-12 21:54:43 -07:00
Behdad Esfahbod
9034f4f3f1 [varLib] Rewrite axis configuration code
We do not accept nonstandard axes if <axes> element is not present.
Breaks one test.  Needs updated expectations.

Soon we'll be generating avar as well and all will be better, much better.
2017-04-12 21:54:43 -07:00
Cosimo Lupo
3f7e095748
[varLib_test] add MVAR table to expected BuildMain.ttx 2017-04-12 12:27:32 +01:00
Behdad Esfahbod
6881121827 Fix tests for recent changes 2017-04-05 15:50:24 +02:00
Behdad Esfahbod
a2b23811a2 Merge pull request #887 from fonttools/class-kern-merge
[varLib.merger] Fix interpolating PairPos Format 2
2017-03-16 16:03:34 -07:00
Miguel Sousa
6ba428eaf7 [varLib.interpolatable test] OTF example 2017-03-15 23:14:21 -07:00
Cosimo Lupo
af7ff9a8fd
fix "InterpolateLayoutGPOS_2_class_diff2.ttx" expected test result
6f41c2ab53 (commitcomment-21293526)
2017-03-13 17:20:28 +00:00
Miguel Sousa
6f41c2ab53 [varLib.interpolate_layout] Fix GPOS LookupType 2 class pairs test results 2017-03-13 06:51:54 -07:00
Miguel Sousa
0cc4ea85c6 [varLib.interpolate_layout] Tests for GPOS LookupType 2 class pairs 2017-03-13 06:51:54 -07:00
Cosimo Lupo
35b9efe648
[varLib.builder_test] added unit tests for buildVarData
b2825ff6b3 (commitcomment-21256990)

Note that the "Tests/varLib/__init__.py" file is necessary so that pytest can distinguish between same-named test modules (e.g. we have another "builder_test.py" file in Tests/feaLib).
2017-03-10 16:01:07 +00:00
Miguel Sousa
3caeb3dab0 [varLib.interpolate_layout] Tests for GPOS ‘size’ feature and LookupType 3, 4, 5, 6 and 8 2017-03-09 03:16:27 -08:00
Miguel Sousa
a3351b9cc4 [varLib.interpolate_layout] Tests for GPOS LookupType 1 and LookupType 2 specific pairs 2017-03-08 01:44:48 -08:00
Cosimo Lupo
dbaa7091c0
[interpolatable_test] skip unless scipy or munkres are installed 2017-03-07 11:35:22 +00:00
Miguel Sousa
8212916aa4 [varLib tests] Test for interpolatable.py 2017-03-06 03:04:45 -08:00
Miguel Sousa
77144253b6 [varLib tests] Add composite glyph ‘atilde’ to TestFamily2 2017-03-06 01:21:03 -08:00
Miguel Sousa
bbecfe38c4 [varLib tests] More tests 2017-03-06 00:59:21 -08:00
Miguel Sousa
274654d440 [varLib tests] Move test results to separate folder 2017-03-05 13:44:32 -08:00
Miguel Sousa
bfccdbb5d5 [varLib tests] Rename test files 2017-03-05 12:05:16 -08:00
Miguel Sousa
af3df891b2 [varLib.mutator] Drop all variable tables 2017-03-04 23:30:37 -08:00
Miguel Sousa
7f792cbaf8 [varLib.mutator] Add HVAR table to test result 2017-03-04 13:02:52 -08:00
Miguel Sousa
de6b436c14 [varLib mutator] Fix test result 2017-03-04 12:55:23 -08:00
Miguel Sousa
e01c52244d [varLib.mutator] Test case and test result 2017-03-03 14:54:40 -08:00
Behdad Esfahbod
9d5e38c439 Merge pull request #869 from anthrotype/varLib-builder-fixes
[varLib.builder] Fix roundtripping XML
2017-03-03 11:31:38 -08:00
Cosimo Lupo
41035a4524
[interpolate_layout_test] add comment to clarify what the test is doing 2017-03-03 10:40:18 +00:00
Miguel Sousa
4eda174a2d [varLib tests] ttx test sources, test case and test result 2017-03-02 23:09:13 -08:00
Miguel Sousa
ed46877a14 [varLib tests] another designspace and ufo test sources
This is a simpler designspace intended for testing the support of GSUB and GPOS merging.
2017-03-02 23:05:34 -08:00
Cosimo Lupo
57ed70d7b0
[varLib_test] compile binary varfont and check TTX dump doesn't change 2017-03-01 17:55:20 +00:00
Cosimo Lupo
0624d53a5b
[Tests] update varLib/data/BuildTest.ttx
The output of saveXML() immediately after running varLib.builder is now
the same as compiling/decompiling/dumping the font with ttx

https://github.com/fonttools/fonttools/pull/866#issuecomment-283397789
2017-03-01 17:31:31 +00:00
Miguel Sousa
6ccd7c83f0 File rename for consistency (https://github.com/fonttools/fonttools/pull/866#issuecomment-283345103) 2017-03-01 06:28:57 -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
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
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