* 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
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.
If no "encoding" argument is provided to Python3 `open`, the default plaftorm's encoding (cp1252 on Windows) is used when decoding bytes to unicode strings.
So, we use the `io.open` function (i.e. a backport of Python3 default file interface) with `encoding="utf_8"` argument.
Fixes https://github.com/behdad/fonttools/issues/323
Previously one had to set the 'ERROR' attribute. Accept raw also.
So, for example one can say:
<cmap raw="1">
<!-- Hand-coded format13 table mapping all Unicode
characters to .notdef glyph. -->
<hexdata>
0000 0001 <!-- version numTables -->
0000 0006 <!-- platformID encodingID -->
0000000C <!-- offset -->
000D 0000 <!-- format reserved -->
0000001C <!-- length -->
00000000 <!-- language -->
00000001 <!-- nGroups -->
00000001 <!-- startCharCode -->
0010FFFE <!-- endCharCode -->
00000001 <!-- glyphID -->
</hexdata>
</cmap>