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.
When reduce() receives an empty sequence, it raises TypeError, unless it is given a third 'initializer' argument
ValueFormat values should default to 0, so we shall use that as initializer.
Also, the reduce() built-in is no longer available on Python 3.
It's still accessible for both py2 and py3 from functools.
Fixes https://github.com/googlei18n/fontmake/issues/241
On python2.7, the fonttools py23 module registers a 'lastResort' StreamHandler
similar to the one found in python3's logging module, that always writes
to the current value `sys.stderr`.
This also applies to any python library that imports from fontTools.misc.py23
under python2.7.
The logging module has a 'shutdown' atexit handler that flushes all the
logging handlers' streams just before the python interpreter exits.
Sometimes (e.g. when calling `python setup.py test` as in MutatorMath's test
suite), the interpreter termination ends with a traceback, which is
triggered by the atexit handler failing to flush the lastResort handler's
stream, sys.stderr
AttributeError: None has no attribute 'stderr'
This is because during module teardown, the globals (in this case 'sys')
are set to None, and the order in which modules are deleted is not
guaranteed.
See 58531934a8
We are using unicode_literals in this module since 329261b.
Because of that, on py27 sometimes a TTFont glyphOrder may end up with
a mix of `str` and `unicode` glyph names.
While I'd love to change every single 'text' string to unicode, maybe
in this case it makes sense to use the native `str` type (`bytes` on
py2, unicode string on py3) for the UV2AGL and AGL2UV dictionaries, as
glyph names can only contain ascii characters anyway.
See https://github.com/fonttools/fonttools/pull/774#discussion_r98327429
In the latest PyPI release 3.6.0, an incosistency in the title levels between
README.rst and NEWS.rst caused PyPI to not correctly format the reStructuredText
document.
I've fixed the PKG-INFO manually for the current release:
https://pypi.python.org/pypi/FontTools/3.6.0
The next release should be fine.