`script_code` does the reverse of `script_name`: it takes a long
script name and returns a 4-letter script code.
Both `script_name` and `script_code` raise KeyError by default,
but can optionally return a default value instead.
I pushed a NEWS.rst with broken indentation, the PyPI page will
display plan text garbage.
Next time I'll use docutils and do `python setup.py check
--restructuredtext` before pushing a new tag.
Also, I forgot to update .travis.yml to build the dist packages
on python3.6 instead of 3.5 after I modified the tox.ini, so
the automatic release from Travis failed.
This time I had to use twine tool to upload the zip and whl
packages from my local machine to PyPI.
Sorry the mess...
As Martin Hosken reported in https://github.com/fonttools/fonttools/pull/1096,
feaLib currently incorrectly handles the case where a marked input
glyph sequence in a contextual chaining sub/pos rule is split into
multiple runs, rather than being a single continuous run of ' marked
glyphs.
The consensus there was to raise a syntax error like makeotf instead of
second-guessing and silently fixing it like fontforge does.
Removed fontTools imports to prevent bootstrapping issues for
downstream package maintainers that wish to run buildUCD.py at
build time (i.e. when fontTools is not installed yet).
to use the bisect built-in module we need to have two separate
tables, one with the ranges themselves (which we pass to bisect
to get an index) and the other containing the script name for
each range.
Also, allow the buildUCD.py script to load data files from a
local directory, e.g. to allow downstream maintainers to rebuild
the generated modules from local files instead of downloading
from Unicode website.
The new `fontTools.unicodedata` module re-exports all the public
functions from the built-in `unicodedata` module, and also adds
additional functions.
The `script` function takes a unicode character and returns the
script name as defined in the UCD "Script.txt" data file.
It's implemented as a simple binary search, plus a memoizing
decorator that caches the results to avoid search the same
character more than once.
The unicodedata2 backport is imported if present, otherwise
the unicodedata built-in is used.
The script currently only parses the Scripts.txt file and
generates a new python module `fontTools.unicodedata.scripts`
containing a `SCRIPT_RANGES` list of tuples, each containing
the range and the corresponding script name.
... instead of a glyphMap dict.
The parser does not actually need a reverse glyph order mapping as
it is not interested in knowing the glyphID from the glyph name,
but only whether a glyph is in the font or not.
This makes it easier for client code (e.g. ufo2ft feature compiler)
to use the feaLib Parser, without having to first construct and pass
it a glyphMap argument.
Right now just reflects the axes, and even that with certain limitations:
- AxisOrdering is set to the order axes are defined,
- Name-table entries are not shared with fvar.
Towards https://github.com/LettError/designSpaceDocument/issues/8