Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Round-trip empty Macintosh cmap format 2 subtables
A format 2 (Mac high-byte) cmap that maps its whole range to .notdef
decompiles to an empty cmap ({}), but recompiling it crashed with
IndexError: cmap_format_2.compile indexed charCodes[0] to decide whether to
force-create subHeader 0, and setIDDelta indexed glyphIndexArray[0], both of
which are empty for an all-notdef cmap. Force subHeader 0 when there are no
char codes at all, and leave idDelta at 0 for an empty subheader. Mirrors
the existing empty-format-4 support.