39 lines
2.9 KiB
HTML
39 lines
2.9 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module robofab.tools.glyphNameSchemes</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="robofab.html"><font color="#ffffff">robofab</font></a>.<a href="robofab.tools.html"><font color="#ffffff">tools</font></a>.glyphNameSchemes</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/projects/robofab/Lib/robofab/tools/glyphNameSchemes.py">/code/projects/robofab/Lib/robofab/tools/glyphNameSchemes.py</a></font></td></tr></table>
|
|
<p><tt>A separate module for glyphname to filename functions.<br>
|
|
<br>
|
|
<a href="#-glyphNameToShortFileName">glyphNameToShortFileName</a>() generates a non-clashing filename for systems with<br>
|
|
filename-length limitations.</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-glyphNameToShortFileName"><strong>glyphNameToShortFileName</strong></a>(glyphName, glyphSet, extension<font color="#909090">='.glif'</font>)</dt><dd><tt>Alternative glyphname to filename function.<br>
|
|
<br>
|
|
Features a garuanteed maximum filename for really long glyphnames, and clash testing.<br>
|
|
- all non-ascii characters are converted to "_" (underscore), including "."<br>
|
|
- all glyphnames which are too long are truncated and a hash is added at the end<br>
|
|
- the hash is generated from the whole glyphname<br>
|
|
- finally, the candidate glyphname is checked against the contents.plist<br>
|
|
and a incrementing number is added at the end if there is a clash.</tt></dd></dl>
|
|
</td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#55aa55">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
|
<td width="100%"><strong>MAXLEN</strong> = 31</td></tr></table>
|
|
</body></html> |