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".
In format 2 and 6, AAT lookups contain a binary search header with
the number of elements in the lookup table. Before this change, the
element count would also include the special trailing end-of-table
value that is required by the font format specification. However,
the binary search header should only count the actual elements
without the trailer.
Also, in the examples from the AAT specification, the special
end-of-table entries use 0xFFFF for glyph ID keys, and zeroes
for the filler values. Before this change, we had filled the
values with 0xFF bytes.
Before this change, the code assumed that all values of AAT lookups
get internally represented as strings, which is correct for GlyphID
values but not generally the case.
Also renaming the XML element from `Substitution` to `Lookup`
because AAT lookups have other uses beyond glyph substitutions.
Before this change, the decoder would silently remove "redundant" values
when decompiling AAT lookups. However, it is perfectly valid for a lookup
to map a glyph ID to itself, and also not all AAT lookups have glyph IDs as
their value range.
With AAT, the same lookup data structure can be used for various
types of values. In the morx table, the values are glyph IDs or
glyph classes, which both are encoded as 16-bit unsigned integers.
In other AAT tables, however, the values can be different data types
with different encodings. By passing a `valueWriter` callback and
explicit `valueSize`, we prepare for eventually templatizing
the building of AATLookups.
Also, assert that the called writer wrote the exact number of bytes
that was predicted when figuring out what format should be used for
encoding an AATLookup.
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>
```