626 lines
48 KiB
HTML
626 lines
48 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module robofab.features.substitute</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.features.html"><font color="#ffffff">features</font></a>.substitute</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/features/substitute.py">/code/projects/robofab/Lib/robofab/features/substitute.py</a></font></td></tr></table>
|
|
<p><tt>Set of objects that process lists of glyphs and performs substitutions.<br>
|
|
<br>
|
|
<br>
|
|
Things that need to be supported:<br>
|
|
- group lookups in <a href="#SequenceToSingle">SequenceToSingle</a><br>
|
|
- SingleToSequence class (ligature decomposition)<br>
|
|
- allow contextual lookup to match and replace more than one glyph<br>
|
|
((['a', 'b'], ['c', 'd'], ['e', 'f']), ['c.alt', 'd.alt'])<br>
|
|
- support group names in place of lists. this should be optional.<br>
|
|
this will require that all groups should be prefixed by '@'</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#Substitute">Substitute</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>(<a href="__builtin__.html#list">__builtin__.list</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#ContextualSingleToSingle">ContextualSingleToSingle</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#SequenceToSingle">SequenceToSingle</a>
|
|
</font></dt><dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#SingleToSingle">SingleToSingle</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
<dt><font face="helvetica, arial"><a href="__builtin__.html#dict">__builtin__.dict</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="robofab.features.substitute.html#Random">Random</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="ContextualSingleToSingle">class <strong>ContextualSingleToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Replace a of glyph with another glyph if<br>
|
|
it is contained in a specified sequence.<br>
|
|
<br>
|
|
Behavior: list<br>
|
|
<br>
|
|
Substitution Structure:<br>
|
|
[<br>
|
|
((leading glyphs, before, trailing glyphs), after)<br>
|
|
]<br>
|
|
- typical structure<br>
|
|
(('A', 'a', 'Z'), 'a.alt')<br>
|
|
-the leading glyphs can be a list and/or the trailing glyphs can be a list<br>
|
|
((['A', 'B'], 'a', 'Z'), 'a.alt')<br>
|
|
(('A', 'a', ['Y', 'Z']), 'a.alt')<br>
|
|
((['A', 'B'], 'a', ['Y', 'Z']), 'a.alt')<br>
|
|
- these lists contain another list representing a group of glyphs that can be matched<br>
|
|
(([['A', 'A.alt'], ['B', 'B.alt']], 'a', [['Y', 'Y.alt'], ['Z', 'Z.alt']]), 'a.alt')<br>
|
|
- before can be a list<br>
|
|
(('A', ['a', 'a.alt1'], 'Z'), 'a.alt2')<br>
|
|
- after can be a list as long as before is a list of the same length<br>
|
|
(('A', ['a', 'b'], 'Z'), ['a.alt', 'b.alt'])<br>
|
|
- the front or back can be set to None indicating that anything can be in that position<br>
|
|
((None, 'a', ['a', 'b']), 'a.swash')<br>
|
|
<br>
|
|
Allows Sub-Lookups: No<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="robofab.features.substitute.html#ContextualSingleToSingle">ContextualSingleToSingle</a></dd>
|
|
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a></dd>
|
|
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="ContextualSingleToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-processStringX"><strong>processStringX</strong></a>(self, glyphString)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><a name="ContextualSingleToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><strong>__dict__</strong> = <dictproxy object at 0x10bb3b0><dd><tt>dictionary for instance variables (if defined)</tt></dl>
|
|
|
|
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of '_BaseListFeature' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><a name="ContextualSingleToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ContextualSingleToSingle-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-append">append</a>(object) -- append object to end</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-extend">extend</a>(iterable) -- extend list by appending elements from the iterable</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
|
|
|
|
<dl><dt><a name="ContextualSingleToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#ContextualSingleToSingle-sort">sort</a>(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) -> -1, 0, 1</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0xa866c57c><dd><tt>T.<a href="#ContextualSingleToSingle-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Random">class <strong>Random</strong></a>(<a href="__builtin__.html#dict">__builtin__.dict</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Replace a of glyph with randomly selected<br>
|
|
glyph from an established list of alternates.<br>
|
|
<br>
|
|
Behavior: <a href="__builtin__.html#dict">dict</a><br>
|
|
<br>
|
|
Substitution Structure:<br>
|
|
{<br>
|
|
glyph name : [alternates]<br>
|
|
}<br>
|
|
- typical structure<br>
|
|
'a' : ['a.alt1', 'a.alt2']<br>
|
|
<br>
|
|
Allows Sub-Lookups: No<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="robofab.features.substitute.html#Random">Random</a></dd>
|
|
<dd><a href="__builtin__.html#dict">__builtin__.dict</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Random-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
|
|
|
|
<dl><dt><a name="Random-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
|
|
|
|
<hr>
|
|
Data and other attributes defined here:<br>
|
|
<dl><dt><strong>__dict__</strong> = <dictproxy object at 0x10bb090><dd><tt>dictionary for instance variables (if defined)</tt></dl>
|
|
|
|
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'Random' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
|
|
<dl><dt><a name="Random-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Random-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-clear"><strong>clear</strong></a>(...)</dt><dd><tt>D.<a href="#Random-clear">clear</a>() -> None. Remove all items from D.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-copy"><strong>copy</strong></a>(...)</dt><dd><tt>D.<a href="#Random-copy">copy</a>() -> a shallow copy of D</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-get"><strong>get</strong></a>(...)</dt><dd><tt>D.<a href="#Random-get">get</a>(k[,d]) -> D[k] if k in D, else d. d defaults to None.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-has_key"><strong>has_key</strong></a>(...)</dt><dd><tt>D.<a href="#Random-has_key">has_key</a>(k) -> True if D has a key k, else False</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-items"><strong>items</strong></a>(...)</dt><dd><tt>D.<a href="#Random-items">items</a>() -> list of D's (key, value) pairs, as 2-tuples</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-iteritems"><strong>iteritems</strong></a>(...)</dt><dd><tt>D.<a href="#Random-iteritems">iteritems</a>() -> an iterator over the (key, value) items of D</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-iterkeys"><strong>iterkeys</strong></a>(...)</dt><dd><tt>D.<a href="#Random-iterkeys">iterkeys</a>() -> an iterator over the keys of D</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-itervalues"><strong>itervalues</strong></a>(...)</dt><dd><tt>D.<a href="#Random-itervalues">itervalues</a>() -> an iterator over the values of D</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-keys"><strong>keys</strong></a>(...)</dt><dd><tt>D.<a href="#Random-keys">keys</a>() -> list of D's keys</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-pop"><strong>pop</strong></a>(...)</dt><dd><tt>D.<a href="#Random-pop">pop</a>(k[,d]) -> v, remove specified key and return the corresponding value<br>
|
|
If key is not found, d is returned if given, otherwise KeyError is raised</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-popitem"><strong>popitem</strong></a>(...)</dt><dd><tt>D.<a href="#Random-popitem">popitem</a>() -> (k, v), remove and return some (key, value) pair as a<br>
|
|
2-tuple; but raise KeyError if D is empty</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-setdefault"><strong>setdefault</strong></a>(...)</dt><dd><tt>D.<a href="#Random-setdefault">setdefault</a>(k[,d]) -> D.<a href="#Random-get">get</a>(k,d), also set D[k]=d if k not in D</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-update"><strong>update</strong></a>(...)</dt><dd><tt>D.<a href="#Random-update">update</a>(E) -> None. Update D from E: for k in E.<a href="#Random-keys">keys</a>(): D[k] = E[k]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="Random-values"><strong>values</strong></a>(...)</dt><dd><tt>D.<a href="#Random-values">values</a>() -> list of D's values</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="__builtin__.html#dict">__builtin__.dict</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0xa866d054><dd><tt>T.<a href="#Random-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
|
|
|
|
<dl><dt><strong>fromkeys</strong> = <built-in method fromkeys of type object at 0x1150480><dd><tt><a href="__builtin__.html#dict">dict</a>.<a href="#Random-fromkeys">fromkeys</a>(S[,v]) -> New <a href="__builtin__.html#dict">dict</a> with keys from S and values equal to v.<br>
|
|
v defaults to None.</tt></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="SequenceToSingle">class <strong>SequenceToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Replace a sequence of glyphs with a single glyph.<br>
|
|
<br>
|
|
Behavior: list<br>
|
|
<br>
|
|
Substitution Structure:<br>
|
|
[<br>
|
|
(before, after)<br>
|
|
]<br>
|
|
- typical structure<br>
|
|
(['a', 'b'], 'a_b')<br>
|
|
<br>
|
|
Allows Sub-Lookups: Yes<br>
|
|
<br>
|
|
XXX NOT YET SUPPORTED:<br>
|
|
-before can be a list:<br>
|
|
([['a', 'b'], ['a.alt', 'b.alt']], 'a_b')<br>
|
|
- after can be a list as long as before is a list of the same length<br>
|
|
([['a', 'b'], ['a.alt', 'b.alt']], ['a_b', 'a.alt_b.alt'])<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="robofab.features.substitute.html#SequenceToSingle">SequenceToSingle</a></dd>
|
|
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a></dd>
|
|
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="SequenceToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><a name="SequenceToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><strong>__dict__</strong> = <dictproxy object at 0x10bb3b0><dd><tt>dictionary for instance variables (if defined)</tt></dl>
|
|
|
|
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of '_BaseListFeature' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><a name="SequenceToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SequenceToSingle-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-append">append</a>(object) -- append object to end</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-extend">extend</a>(iterable) -- extend list by appending elements from the iterable</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SequenceToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#SequenceToSingle-sort">sort</a>(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) -> -1, 0, 1</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0xa866c57c><dd><tt>T.<a href="#SequenceToSingle-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="SingleToSingle">class <strong>SingleToSingle</strong></a>(<a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>Replace a of glyph with another glyph.<br>
|
|
<br>
|
|
Behavior: list<br>
|
|
<br>
|
|
Substitution Structure:<br>
|
|
[<br>
|
|
(before, after)<br>
|
|
]<br>
|
|
- typical structure<br>
|
|
('a', 'a.alt')<br>
|
|
-before can be a list:<br>
|
|
(['a', 'a.alt1'], 'a.alt2')<br>
|
|
- after can be a list as long as before is a list of the same length<br>
|
|
(['a', 'b'], ['a.alt', 'b.alt'])<br>
|
|
<br>
|
|
Allows Sub-Lookups: No<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="robofab.features.substitute.html#SingleToSingle">SingleToSingle</a></dd>
|
|
<dd><a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a></dd>
|
|
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="SingleToSingle-processString"><strong>processString</strong></a>(self, glyphString)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><a name="SingleToSingle-__init__"><strong>__init__</strong></a>(self, substitution)</dt></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="robofab.features.substitute.html#_BaseListFeature">_BaseListFeature</a>:<br>
|
|
<dl><dt><strong>__dict__</strong> = <dictproxy object at 0x5317d0><dd><tt>dictionary for instance variables (if defined)</tt></dl>
|
|
|
|
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of '_BaseListFeature' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><a name="SingleToSingle-__add__"><strong>__add__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__add__">__add__</a>(y) <==> x+y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__mul__"><strong>__mul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__mul__">__mul__</a>(n) <==> x*n</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__rmul__"><strong>__rmul__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__rmul__">__rmul__</a>(n) <==> n*x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#SingleToSingle-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-append">append</a>(object) -- append object to end</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-extend">extend</a>(iterable) -- extend list by appending elements from the iterable</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
|
|
|
|
<dl><dt><a name="SingleToSingle-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#SingleToSingle-sort">sort</a>(cmpfunc=None) -- stable sort *IN PLACE*; cmpfunc(x, y) -> -1, 0, 1</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0xa866c57c><dd><tt>T.<a href="#SingleToSingle-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
|
|
|
|
</td></tr></table> <p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="Substitute">class <strong>Substitute</strong></a>(<a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>The main substitution object.<br>
|
|
<br>
|
|
-All features should be registered by passing<br>
|
|
a feature name and a substitution structure<br>
|
|
to the registerFeature method.<br>
|
|
<br>
|
|
-Glyph lists are prcessed with the processGlyphList<br>
|
|
method. This will send back a list of glyphs that have<br>
|
|
been processed according to the available features.<br>
|
|
<br>
|
|
-To turn a feature on or off, call it as you would a <a href="__builtin__.html#dict">dict</a><br>
|
|
and set the "on" attribute.<br>
|
|
<br>
|
|
need to support:<br>
|
|
order(): return and ordered list of all features that are on<br>
|
|
setOrder(list): set the firing order<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="robofab.features.substitute.html#Substitute">Substitute</a></dd>
|
|
<dd><a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="Substitute-processGlyphList"><strong>processGlyphList</strong></a>(self, glyphList)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-registerFeature"><strong>registerFeature</strong></a>(self, name, typeOfFeature, substitution)</dt></dl>
|
|
|
|
<hr>
|
|
Methods inherited from <a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>:<br>
|
|
<dl><dt><a name="Substitute-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-__len__"><strong>__len__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-clear"><strong>clear</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-copy"><strong>copy</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-get"><strong>get</strong></a>(self, key, default<font color="#909090">=None</font>)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-has_key"><strong>has_key</strong></a>(self, key)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-items"><strong>items</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-keys"><strong>keys</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-update"><strong>update</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="Substitute-values"><strong>values</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="robofab.features.featureTools.html#SortedDict">robofab.features.featureTools.SortedDict</a>:<br>
|
|
<dl><dt><strong>__dict__</strong> = <dictproxy object at 0x531890><dd><tt>dictionary for instance variables (if defined)</tt></dl>
|
|
|
|
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'SortedDict' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
|
|
|
|
</td></tr></table></td></tr></table><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="-breakGlyphString"><strong>breakGlyphString</strong></a>(glyphString)</dt><dd><tt>take a / delimited list with and turn<br>
|
|
it into a list of glyph names<br>
|
|
'/a/b/c/' -> ['a', 'b', 'c']</tt></dd></dl>
|
|
<dl><dt><a name="-makeGlyphString"><strong>makeGlyphString</strong></a>(glyphList)</dt><dd><tt>take a list of glyph names and turn them into<br>
|
|
a / delimited list with a preceding and following /<br>
|
|
['a', 'b', 'c'] -> '/a/b/c/'</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>CNTX_SING_2_SING</strong> = 'contextual_single_to_single'<br>
|
|
<strong>RAND</strong> = 'random'<br>
|
|
<strong>SAFE_NONE</strong> = <robofab.features.featureTools.SafeNone object at 0x52a810><br>
|
|
<strong>SEP_MARK</strong> = '/'<br>
|
|
<strong>SEQ_2_SING</strong> = 'sequence_to_single'<br>
|
|
<strong>SING_2_SING</strong> = 'single_to_single'</td></tr></table>
|
|
</body></html> |