if explicitly enabled, it will raise ImportError if uharfbuzz is not found, and will propagate the uharfbuzz error instead of silently falling back to the pure-python serializer
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
* Revert most of "Use Vector in some places where it improves the clarity of the code (#2206)"
This reverts most of commit 0d3ce2cafc6f604fc46d4d3bfbab34a5bc59e27b.
* Use Vector in some places where it improves the clarity of the code
* add __all__ to vector.py
* turned some list comprehensions into generator expressions: there's no need for an intermediate list in these cases
* Add empty __slots__ to Vector, so we don't waste space on a __dict__.
* add some tests for segmentPointAtT
Somehow we forgot to replace round -> otRound in arrayTools.calcIntBounds.
This function is used by glyf table to compute the glyphs' bounding boxes.
We already use otRound (aka 'int(math.floor(v + .5))') to round glyph
coordinates upon compiling glyf table. So the use of python3's round
in calcIntBounds was producing inconsistent roundings between the glyph
coordinates and the glyph bbox (sometimes, i.e. only when the glyf table
contains float coordinates, e.g. after instantiating with varLib.mutator).
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
I'm also unimpressed by the copy-pasted bounds logic in hhea and vhea,
and the fact that that's coded in there instead of calling a function
on CFF / glyf tables respectively.
The split-glyf-to-one-glyph-per-file feature is only partially implemented,
as it was discussed here:
https://github.com/fonttools/fonttools/issues/153#issuecomment-346677171
I need to cut a bugfix release today, but I don't want to ship this as is.
I prefer to temporarily rever, tag a release from master branch, then
revert it again to its present state so that bamidei can complete his
work.
---
Revert "[glyf] make splitGlyphs output more compact"
This reverts commit d08d635a93289982b028aacd3b9039fbe742f3e8.
Revert "more whitespace"
This reverts commit bd030f61c6b360fd360632bbc6c19abb057c9a24.
Revert "minor whitespace"
This reverts commit f2a8c787b13b92ae0e0f61477e584316144747c7.
Revert "Merge pull request #1035 from bamidei/split_g_l_y_f_to_one_per_file"
This reverts commit 17b89d9dde7691dbbb6815efba92eff446af62ac, reversing
changes made to b8482d9666f08d3603ee93d3ca52931550f715fc.