glyphNameSchemes

A separate module for glyphname to filename functions.

glyphNameToShortFileName() generates a non-clashing filename for systems with filename-length limitations.

glyphNameToShortFileName(glyphName, glyphSet)

Alternative glyphname to filename function.

Features a garuanteed maximum filename for really long glyphnames, and clash testing. - all non-ascii characters are converted to “_” (underscore), including ”.” - all glyphnames which are too long are truncated and a hash is added at the end - the hash is generated from the whole glyphname - finally, the candidate glyphname is checked against the contents.plist and a incrementing number is added at the end if there is a clash.

links