* 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
This should fix https://github.com/fonttools/fonttools/issues/1119
Running `ftxvalidator -T tt0004c_#1.ttf` no longer produces this error
message, but passes with 'NA'
```
Fatal
post: The name data overflow the table bounds.
kATSFontTestSeverityFatalError
```
the third (2015) edition of ISO/IEC 14496-22 "Open Font Format" increased
the limit from 32767 to 65535 (and thus eliminated the reserved numbers).
`array.array` will take care of raising the right `OverflowError` exception
so we don't need any further checking.
But preserve it...
For example, with this font:
https://code.google.com/p/googlefontdirectory/source/browse/ofl/phetsarath/Phetsarath-Regular.ttf
we now get:
...
<GlyphID id="136" name="uni0EDD.am"/>
<GlyphID id="137" name="uni0EB3.right"/>
<GlyphID id="138" name="glyph00138"/>
<GlyphID id="139" name="glyph00139"/>
<GlyphID id="140" name="glyph00140"/>
...
<GlyphID id="161" name="glyph00161"/>
</GlyphOrder>
...
<post>
<formatType value="2.0"/>
<italicAngle value="0.0"/>
<underlinePosition value="-217"/>
<underlineThickness value="150"/>
<isFixedPitch value="0"/>
<minMemType42 value="0"/>
<maxMemType42 value="0"/>
<minMemType1 value="0"/>
<maxMemType1 value="0"/>
<psNames>
<!-- This file uses unique glyph names based on the information
found in the 'post' table. Since these names might not be unique,
we have to invent artificial names in case of clashes. In order to
be able to retain the original information, we need a name to
ps name mapping for those cases where they differ. That's what
you see below.
-->
<psName name="glyph00107" psName=""/>
<psName name="glyph00138" psName=""/>
<psName name="glyph00139" psName=""/>
...
<psName name="glyph00161" psName=""/>
</psNames>
Part of https://github.com/behdad/fonttools/issues/124
This is a followup fix to 85be2e0a9773acec3c6d14c345b1fd94ab3aa5c3
Before this change, if some glyph names had a "#-number" suffix in
the post table, we could generate duplicate glyph names. Fix that,
even though "#" is NOT a valid character in PS glyph names.
Our footprint in the Python module namespace is all under
fontTools now. User code importing sstruct should be updated
to say "from fontTools.misc import sstruct".
that doesn't mean all glyphs in the standard order are there.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@174 4cde692c-a291-49d1-8350-778aa11640f8