Ticket #6 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Default glyph namer in glifLib.py fails to distinguish T_h and T_H

Reported by: erik Assigned to: erik, just
Priority: critical Milestone:
Component: component1 Version:
Keywords: Cc:

Description

glyphNameToFileName creates a filename for a given glyphname. In order to prevent files being overwritten in caseless file systems, the function adds an underscore if a glyphname starts with an uppercase character. In compound glyphnames used for ligatures, differentiation is required for all partial names, not just the first.

Glyphs in a font with compound names in which the first glyph is the same, but subsequent names only have case differences, like T_H and T_h, these glyphs will overwrite each other as glif.

Second issue here is that the underscore serves a double purpose in compound names. It is the case indicator but also serves as the compound glyph name separator. When adding a _ for each uppercase partial name, it is possible to get names like Th.glif and TH_.glif.

Attachments

test.py (1.4 kB) - added by erik on 03/26/09 13:28:15.

Change History

03/26/09 13:28:15 changed by erik

  • attachment test.py added.

03/27/09 15:36:58 changed by erik

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in revision 180. Gliflib.py has an improved naming function. The test for gliflib failed on a glyph named F_A_B, its filename was F_A_B_.glif. Under the new scheme, this is FAB_.glif. The demo font in the repository has been updated as well. Gliflib test passes.

A A_.glif F_A_B FAB_.glif B B_.glif G G_.glif F F_.glif a#condensed_light a#condensed_light.glif O O_.glif a#wide_light a#wide_light.glif testglyph1 testglyph1.glif R R_.glif a a.glif a#wide_bold a#wide_bold.glif testglyph1.reversed testglyph1.reversed.glif a#condensed_bold a#condensed_bold.glif ........


Ran 8 tests in 0.173s

OK