So we now round towards +Infinity in:
- floatToFixed (which fully examplify that quotes from OT spec)
- psCharStrings: when packing floats as fixed 16.16
- t2CharStringPen: when rounding coordinates and advance widths
- subset: when rounding advance widths to compute average
- TupleVariation: rounding gvar deltas
- _g_l_y_f: when rounding coordinates: both in GlyphComponent.{x,y}
and for GlyphCoordinates.toInt()
- _h_m_t_x: for rounding horiz/vert metrics
- varLib: rounding horiz metrics and deltas
* 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
OpenType TupleVariations can be used in two places:
* In the `gvar` table, they modify glyph contour points by shifting
them towards a point in 2D space.
* In the `cvar` table, they modify constant values.
Before this change, we only had code to handle the `gvar` version
which shifts points around by delta values.
After this change, the XML parsing and generation routines of
TupleVariations can handle deltas that modify constant values in the
CVT table, as used in `cvar`.
An upcoming change will add support for the binary encoding of
TupleVariations as needed for `cvar`.