| |
- robofab.objects.objectsBase.BaseAnchor(robofab.objects.objectsBase.RBaseObject)
-
- RAnchor
- robofab.objects.objectsBase.BaseBPoint(robofab.objects.objectsBase.RBaseObject)
-
- RBPoint
- robofab.objects.objectsBase.BaseComponent(robofab.objects.objectsBase.RBaseObject)
-
- RComponent
- robofab.objects.objectsBase.BaseContour(robofab.objects.objectsBase.RBaseObject)
-
- RContour
- robofab.objects.objectsBase.BaseFont(robofab.objects.objectsBase.RBaseObject)
-
- RFont
- robofab.objects.objectsBase.BaseGlyph(robofab.objects.objectsBase.RBaseObject)
-
- RGlyph
- robofab.objects.objectsBase.BaseGroups(__builtin__.dict)
-
- RGroups
- robofab.objects.objectsBase.BaseGuide(robofab.objects.objectsBase.RBaseObject)
-
- RGuide
- robofab.objects.objectsBase.BaseInfo(robofab.objects.objectsBase.RBaseObject)
-
- RInfo
- robofab.objects.objectsBase.BaseKerning(robofab.objects.objectsBase.RBaseObject)
-
- RKerning
- robofab.objects.objectsBase.BaseLib(__builtin__.dict)
-
- RLib
- robofab.objects.objectsBase.BasePoint(robofab.objects.objectsBase.RBaseObject)
-
- RPoint
- robofab.objects.objectsBase.BaseSegment(robofab.objects.objectsBase.RBaseObject)
-
- RSegment
class RAnchor(robofab.objects.objectsBase.BaseAnchor) |
|
RoboFab wrapper for FL Anchor object |
|
- Method resolution order:
- RAnchor
- robofab.objects.objectsBase.BaseAnchor
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, flAnchor, index)
Properties defined here:
- index
- index of the anchor
- get = _get_index(self)
- mark
- mark
- get = _get_mark(self)
- set = _set_mark(self, value)
- name
- name
- get = _get_name(self)
- set = _set_name(self, value)
- position
- position of the anchor
- get = _get_position(self)
- set = _set_position(self, value)
- x
- x
- get = _get_x(self)
- set = _set_x(self, value)
- y
- y
- get = _get_y(self)
- set = _set_y(self, value)
Methods inherited from robofab.objects.objectsBase.BaseAnchor:
- __add__(self, other)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- copy(self, aParent=None)
- Duplicate this anchor.
- draw(self, pen)
- Draw the object onto a segment pen
- drawPoints(self, pen)
- draw the object with a point pen
- move(self, (x, y))
- Move the anchor
- round(self)
- round the values in the anchor
- scale(self, (x, y), center=(0, 0))
- scale the anchor
- transform(self, matrix)
- Transform this anchor. Use a Transform matrix
object from fontTools.misc.transform
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RBPoint(robofab.objects.objectsBase.BaseBPoint) |
| |
- Method resolution order:
- RBPoint
- robofab.objects.objectsBase.BaseBPoint
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, segmentIndex)
- copy(self, aParent=None)
- Copy this object -- result is an ObjectsRF flavored object.
There is no way to make this work using FontLab objects.
Copy is mainly used for glyphmath.
Properties defined here:
- index
- get = _get_index(self)
- selected
- get = _get_selected(self)
- set = _set_selected(self, value)
Methods inherited from robofab.objects.objectsBase.BaseBPoint:
- __add__(self, other)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- move(self, (x, y))
- move the bPoint
- round(self)
- Round the coordinates to integers
- scale(self, (x, y), center=(0, 0))
- scale the bPoint
- select(self, state=True)
- Set the selection of this point.
XXXX This method should be a lot more versatile, dealing with
different kinds of selection, select the bcp's seperately etc.
But that's for later when we need it more. For now it's just
one flag for the entire thing.
- transform(self, matrix)
- Transform this point. Use a Transform matrix
object from fontTools.misc.transform
Properties inherited from robofab.objects.objectsBase.BaseBPoint:
- anchor
- the position of the anchor
- get = _get_anchor(self)
- set = _set_anchor(self, value)
- bcpIn
- the (x,y) for the incoming bcp
- get = _get_bcpIn(self)
- set = _set_bcpIn(self, value)
- bcpOut
- the (x,y) for the outgoing bcp
- get = _get_bcpOut(self)
- set = _set_bcpOut(self, value)
- type
- the type of bPoint, either 'corner' or 'curve'
- get = _get_type(self)
- set = _set_type(self, pointType)
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RComponent(robofab.objects.objectsBase.BaseComponent) |
|
RoboFab wrapper for FL Component object |
|
- Method resolution order:
- RComponent
- robofab.objects.objectsBase.BaseComponent
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, flComponent, index)
- copy(self, aParent=None)
- Copy this object -- result is an ObjectsRF flavored object.
There is no way to make this work using FontLab objects.
Copy is mainly used for glyphmath.
- decompose(self)
- Decompose the component
- move(self, (x, y))
- Move the component
Properties defined here:
- baseGlyph
- get = _get_baseGlyph(self)
- index
- index of component
- get = _get_index(self)
- offset
- the offset of the component
- get = _get_offset(self)
- set = _set_offset(self, value)
- scale
- the scale of the component
- get = _get_scale(self)
- set = _set_scale(self, (x, y))
Methods inherited from robofab.objects.objectsBase.BaseComponent:
- __add__(self, other)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- draw(self, pen)
- Segment pen drawing method.
- drawPoints(self, pen)
- draw the object with a point pen
- round(self)
- round the offset values
Properties inherited from robofab.objects.objectsBase.BaseComponent:
- box
- the bounding box of the component: (xMin, yMin, xMax, yMax)
- get = _get_box(self)
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RContour(robofab.objects.objectsBase.BaseContour) |
|
RoboFab wrapper for non FL contour object |
|
- Method resolution order:
- RContour
- robofab.objects.objectsBase.BaseContour
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, index)
- __len__(self)
- appendSegment(self, segmentType, points, smooth=False)
- copy(self, aParent=None)
- Copy this object -- result is an ObjectsRF flavored object.
There is no way to make this work using FontLab objects.
Copy is mainly used for glyphmath.
- getParent(self)
- insertSegment(self, index, segmentType, points, smooth=False)
- insert a seggment into the contour
- removeSegment(self, index)
- remove a segment from the contour
- reverseContour(self)
- reverse contour direction
- setParent(self, parentGlyph)
- setStartSegment(self, segmentIndex)
- set the first node on the contour
Properties defined here:
- bPoints
- get = _get_bPoints(self)
- index
- the index of the contour
- get = _get_index(self)
- set = _set_index(self, index)
- points
- get = _get_points(self)
- selected
- selection of the contour: 1-selected or 0-unselected
- get = _get_selected(self)
- set = _set_selected(self, value)
Methods inherited from robofab.objects.objectsBase.BaseContour:
- __add__(self, other)
- __getitem__(self, index)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- appendBPoint(self, pointType, anchor, bcpIn=(0, 0), bcpOut=(0, 0))
- append a bPoint to the contour
- autoStartSegment(self)
- automatically set the lower left point of the contour as the first point.
- draw(self, pen)
- draw the object with a fontTools pen
- drawPoints(self, pen)
- draw the object with a point pen
- insertBPoint(self, index, pointType, anchor, bcpIn=(0, 0), bcpOut=(0, 0))
- insert a bPoint at index on the contour
- move(self, (x, y))
- move the contour
- pointInside(self, (x, y), evenOdd=0)
- determine if the point is inside or ouside of the contour
- rotate(self, angle, offset=None)
- rotate the contour
- round(self)
- round the value of all points in the contour
- scale(self, (x, y), center=(0, 0))
- scale the contour
- skew(self, angle, offset=None)
- skew the contour
- transform(self, matrix)
- Transform this contour.
Use a Transform matrix object from
robofab.transform
Properties inherited from robofab.objects.objectsBase.BaseContour:
- box
- the bounding box for the contour
- get = _get_box(self)
- clockwise
- direction of contour: 1=clockwise 0=counterclockwise
- get = _get_clockwise(self)
- set = _set_clockwise(self, value)
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- dump(self, private=False)
- Print a dump of this object to the std out.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RFont(robofab.objects.objectsBase.BaseFont) |
|
RoboFab UFO wrapper for FL Font object |
|
- Method resolution order:
- RFont
- robofab.objects.objectsBase.BaseFont
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __cmp__(self, other)
- __contains__ = has_key(self, glyphName)
- __init__(self, font=None)
- __setitem__(self, glyphName, glyph)
- appendHGuide(self, position, angle=0)
- Append a horizontal guide
- appendVGuide(self, position, angle=0)
- Append a horizontal guide
- clearHGuides(self)
- Clear all horizontal guides.
- clearVGuides(self)
- Clear all vertical guides.
- close(self, save=False)
- Close the font, saving is optional.
- generate(self, outputType, path=None)
- generate the font. outputType is the type of font to ouput.
--Ouput Types:
'pctype1' : PC Type 1 font (binary/PFB)
'pcmm' : PC MultipleMaster font (PFB)
'pctype1ascii' : PC Type 1 font (ASCII/PFA)
'pcmmascii' : PC MultipleMaster font (ASCII/PFA)
'unixascii' : UNIX ASCII font (ASCII/PFA)
'mactype1' : Mac Type 1 font (generates suitcase and LWFN file)
'otfcff' : PS OpenType (CFF-based) font (OTF)
'otfttf' : PC TrueType/TT OpenType font (TTF)
'macttf' : Mac TrueType font (generates suitcase)
'macttdfont' : Mac TrueType font (generates suitcase with resources in data fork)
(doc adapted from http://dev.fontlab.net/flpydoc/)
path can be a directory or a directory file name combo:
path="DirectoryA/DirectoryB"
path="DirectoryA/DirectoryB/MyFontName"
if no path is given, the file will be output in the same directory
as the vfb file. if no file name is given, the filename will be the
vfb file name with the appropriate suffix.
- getGlyph(self, glyphName)
- getHGuides(self)
- Return a list of wrapped horizontal guides in this RFont
- getOTClass(self, name)
- Get a specific OpenType class.
- getOTClasses(self)
- Return all OpenType classes as a dict. Relies on properly formatted classes.
- getOTFeature(self, name)
- return a specific OpenType feature.
- getOTFeatures(self)
- Return all OpenType features as a dict keyed by name.
The value is a string of the text of the feature.
- getVGuides(self)
- Return a list of wrapped vertical guides in this RFont
- has_key(self, glyphName)
- insertGlyph(self, glyph, as=None)
- Returns a new glyph that has been inserted into the font.
as = another glyphname if you want to insert as with that.
- keys(self)
- newGlyph(self, glyphName, clear=False)
- Make a new glyph
- readUFO(self, path, doProgress=False)
- read a .ufo into the font
- removeGlyph(self, glyphName)
- remove a glyph from the font
- removeHGuide(self, guide)
- Remove a horizontal guide.
- removeVGuide(self, guide)
- Remove a vertical guide.
- save(self, path=None)
- Save the font, path is required.
- setOTClass(self, name, list)
- Set a specific OpenType class.
- setOTClasses(self, dict)
- Set all OpenType classes.
- setOTFeature(self, name, text)
- Set a specific OpenType feature.
- setOTFeatures(self, dict)
- Set all OpenType features in the font.
- update(self)
- Don't forget to update the font when you are done.
- writeUFO(self, path=None, doProgress=False, glyphNameToFileNameFunc=None)
- write a font to .ufo
Class methods defined here:
- getAllFonts(cls) from __builtin__.type
Properties defined here:
- fileName
- the font's file name
- get = _get_fileName(self)
- fontIndex
- the fontindex for this font
- get = _get_fontIndex(self)
- glyphs
- A list of all glyphs in the font, to allow iterations through Font.glyphs
- get = _get_glyphs(self)
- groups
- a group object
- get = _get_groups(self)
- set = _set_groups(self, aDict)
- info
- font info object
- get = _get_info(self)
- kerning
- a kerning object
- get = _get_kerning(self)
- lib
- font lib object
- get = _get_lib(self)
- # the lib getter and setter are shared by RFont and RGlyph
- set = _set_lib(self, aDict)
- path
- path to the font
- get = _get_path(self)
- selection
- the glyph selection in the font window
- get = _get_selection(self)
- set = _set_selection(self, list)
Methods inherited from robofab.objects.objectsBase.BaseFont:
- __eq__(self, other)
- __getitem__(self, glyphName)
- __iter__(self)
- __repr__(self)
- autoUnicodes(self)
- Using fontTools.agl, assign Unicode lists to all glyphs in the font
- compileGlyph(self, glyphName, baseName, accentNames, adjustWidth=False, preflight=False, printErrors=True)
- Compile components into a new glyph using components and anchorpoints.
font: the font
glyphName: the name of the glyph where it all needs to go
baseName: the name of the base glyph
accentNames: a list of accentName, anchorName tuples, [('acute', 'top'), etc]
- generateGlyph(self, glyphName, replace=1, preflight=False, printErrors=True)
- Generate a glyph and return it. Assembled from GlyphConstruction.txt
- getCharacterMapping(self)
- Create a dictionary of unicode -> [glyphname, ...] mappings.
Note that this dict is created each time this method is called,
which can make it expensive for larger fonts. All glyphs are loaded.
Note that one glyph can have multiple unicode values,
and a unicode value can have multiple glyphs pointing to it.
- getGlyphNameToFileNameFunc(self)
- getReverseComponentMapping(self)
- Get a reversed map of component references in the font.
{
'A' : ['Aacute', 'Aring']
'acute' : ['Aacute']
'ring' : ['Aring']
etc.
}
- interpolate(self, factor, minFont, maxFont, suppressError=True, analyzeOnly=False, doProgress=False)
- Traditional interpolation method. Interpolates by factor between minFont and maxFont.
suppressError will supress all tracebacks and analyze only will not perform the interpolation
but it will analyze all glyphs and return a dict of problems.
- round(self)
- round all of the points in all of the glyphs
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- copy(self, aParent=None)
- Duplicate this object. Pass an object for parenting if you want.
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RGlyph(robofab.objects.objectsBase.BaseGlyph) |
|
RoboFab wrapper for FL Glyph object |
|
- Method resolution order:
- RGlyph
- robofab.objects.objectsBase.BaseGlyph
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- GetBoundingRect(self, masterIndex)
- FL compatibility
- GetMetrics(self, masterIndex)
- FL compatibility
- SetMetrics(self, value, masterIndex)
- FL compatibility
- __add__(self, other)
- __delitem__(self, index)
- __getitem__(self, index)
- __init__(self, flGlyph)
- __len__(self)
- __mul__(self, factor)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- appendAnchor(self, name, position)
- Append an anchor to the glyph
- appendComponent(self, baseGlyph, offset=(0, 0), scale=(1, 1))
- Append a component to the glyph. x and y are optional offset values
- appendHGuide(self, position, angle=0)
- Append a horizontal guide
- appendVGuide(self, position, angle=0)
- Append a horizontal guide
- autoHint(self)
- Automatically generate type 1 hints.
- center(self, padding=None)
- Equalise sidebearings, set to padding if wanted.
- clear(self, contours=True, components=True, anchors=True, guides=True, hints=True)
- Clear all items marked as true from the glyph
- clearAnchors(self)
- Clear all anchors.
- clearComponents(self)
- Clear all components.
- clearHGuides(self)
- Clear all horizontal guides.
- clearVGuides(self)
- Clear all vertical guides.
- copy(self, aParent=None)
- Make a copy of this glyph.
Note: the copy is not a duplicate fontlab glyph, but
a RF RGlyph with the same outlines. The new glyph is
not part of the fontlab font in any way. Use font.appendGlyph(glyph)
to get it in a FontLab glyph again.
- decompose(self)
- Decompose all components
- getAnchors(self)
- Return a list of wrapped anchors in this RGlyph.
- getComponents(self)
- Return a list of wrapped components in this RGlyph.
- getHGuides(self)
- Return a list of wrapped horizontal guides in this RGlyph
- getPointPen(self)
- getVGuides(self)
- Return a list of wrapped vertical guides in this RGlyph
- move(self, (x, y), contours=True, components=True, anchors=True)
- Move a glyph's items that are flagged as True
- removeAnchor(self, anchor)
- Remove a specific anchor from the glyph. This only works
if the glyph does not have anchors with duplicate names
in exactly the same location with the same mark.
- removeComponent(self, component)
- Remove a specific component from the glyph. This only works
if the glyph does not have duplicate components in the same location.
- removeContour(self, index)
- remove a specific contour from the glyph
- removeHGuide(self, guide)
- Remove a horizontal guide.
- removeOverlap(self)
- Remove overlap
- removeVGuide(self, guide)
- Remove a vertical guide.
- update(self)
- Don't forget to update the glyph when you are done.
Properties defined here:
- anchors
- allow for iteration through glyph.anchors
- get = _get_anchors(self)
- baseName
- get = _get_baseName(self)
- box
- box of glyph as a tuple (xMin, yMin, xMax, yMax)
- get = _get_box(self)
- components
- allow for iteration through glyph.components
- get = _get_components(self)
- contours
- allow for iteration through glyph.contours
- get = _get_contours(self)
- index
- return the index of the glyph in the font
- get = _get_index(self)
- lib
- glyph lib object
- get = _get_lib(self)
- # the lib getter and setter are shared by RFont and RGlyph
- set = _set_lib(self, aDict)
- mark
- mark
- get = _get_mark(self)
- set = _set_mark(self, value)
- name
- name
- get = _get_name(self)
- set = _set_name(self, value)
- note
- note
- get = _get_note(self)
- set = _set_note(self, value)
- psName
- name
- get = _get_psName(self)
- set = _set_psName(self, value)
- selected
- Select or deselect the glyph in the font window
- get = _get_selected(self)
- set = _set_selected(self, value)
- unicode
- unicode
- get = _get_unicode(self)
- set = _set_unicode(self, value)
- unicodes
- unicodes
- get = _get_unicodes(self)
- set = _set_unicodes(self, value)
- width
- the width
- get = _get_width(self)
- set = _set_width(self, value)
Methods inherited from robofab.objects.objectsBase.BaseGlyph:
- __div__(self, factor)
- __eq__(self, other)
- __repr__(self)
- appendContour(self, aContour, offset=(0, 0))
- append a contour to the glyph
- appendGlyph(self, aGlyph, offset=(0, 0))
- append another glyph to the glyph
- autoContourOrder(self)
- attempt to sort the contours based on their centers
- autoUnicodes(self)
- Using fontTools.agl, assign Unicode list to the glyph
- correctDirection(self, trueType=False)
- corect the direction of the contours in the glyph.
- deSelect(self)
- Set all selected attrs in glyph to False: for the glyph, components, anchors, points.
- draw(self, pen)
- draw the object with a RoboFab segment pen
- drawPoints(self, pen)
- draw the object with a point pen
- getGlyph(self, glyphName)
- Provided there is a font parent for this glyph, return a sibling glyph.
- getPen(self)
- Return a Pen object for creating an outline in this glyph.
- interpolate(self, factor, minGlyph, maxGlyph, suppressError=True, analyzeOnly=False)
- Traditional interpolation method. Interpolates by factor between minGlyph and maxGlyph.
suppressError will supress all tracebacks and analyze only will not perform the interpolation
but it will analyze all glyphs and return a dict of problems.
- isCompatible(self, otherGlyph, report=True)
- Return a bool value if the glyph is compatible with otherGlyph.
With report = True, isCompatible will return a report of what's wrong.
The interpolate method requires absolute equality between contour data.
Absolute equality is preferred among component and anchor data, but
it is NOT required. Interpolation between components and anchors
will only deal with compatible data and incompatible data will be
ignored. This method reflects this system.
- isEmpty(self)
- return true if the glyph has no contours or components
- pointInside(self, (x, y), evenOdd=0)
- determine if the point is in the black or white of the glyph
- rasterize(self, cellSize=50, xMin=None, yMin=None, xMax=None, yMax=None)
- Slice the glyph into a grid based on the cell size.
It returns a list of lists containing bool values
that indicate the black (True) or white (False)
value of that particular cell. These lists are
arranged from top to bottom of the glyph and
proceed from left to right.
This is an expensive operation!
- rotate(self, angle, offset=None)
- rotate the glyph
- round(self)
- round all coordinates in all contours, components and anchors
- scale(self, (x, y), center=(0, 0))
- scale the glyph
- skew(self, angle, offset=None)
- skew the glyph
- transform(self, matrix)
- Transform this glyph.
Use a Transform matrix object from
robofab.transform
Properties inherited from robofab.objects.objectsBase.BaseGlyph:
- leftMargin
- the left margin
- get = _get_leftMargin(self)
- set = _set_leftMargin(self, value)
- rightMargin
- the right margin
- get = _get_rightMargin(self)
- set = _set_rightMargin(self, value)
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RGroups(robofab.objects.objectsBase.BaseGroups) |
|
RoboFab wrapper for FL group data |
|
- Method resolution order:
- RGroups
- robofab.objects.objectsBase.BaseGroups
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __delitem__(self, key)
- __init__(self, aDict)
- __setitem__(self, key, value)
- clear(self)
- pop(self, key)
- popitem(self)
- setdefault(self, key, value=None)
- update(self, aDict)
Methods inherited from robofab.objects.objectsBase.BaseGroups:
- __repr__(self)
- findGlyph(self, glyphName)
- return a list of all groups contianing glyphName
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.BaseGroups:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'BaseGroups' objects>
- list of weak references to the object (if defined)
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- x.__contains__(y) <==> y in x
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
|
class RInfo(robofab.objects.objectsBase.BaseInfo) |
|
RoboFab wrapper for FL Font Info |
|
- Method resolution order:
- RInfo
- robofab.objects.objectsBase.BaseInfo
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, font)
Properties defined here:
- ascender
- ascender value
- get = _get_ascender(self)
- set = _set_ascender(self, value)
- capHeight
- cap height value
- get = _get_capHeight(self)
- set = _set_capHeight(self, value)
- copyright
- copyright
- get = _get_copyright(self)
- set = _set_copyright(self, value)
- createdBy
- source
- get = _get_createdBy(self)
- set = _set_createdBy(self, value)
- defaultWidth
- default width value
- get = _get_defaultWidth(self)
- set = _set_defaultWidth(self, value)
- descender
- descender value
- get = _get_descender(self)
- set = _set_descender(self, value)
- designer
- designer
- get = _get_designer(self)
- set = _set_designer(self, value)
- designerURL
- designer_url
- get = _get_designerURL(self)
- set = _set_designerURL(self, value)
- familyName
- family_name
- get = _get_familyName(self)
- set = _set_familyName(self, value)
- fondID
- fond_id
- get = _get_fondID(self)
- set = _set_fondID(self, value)
- fondName
- apple_name
- get = _get_fondName(self)
- set = _set_fondName(self, value)
- fontName
- font_name
- get = _get_fontName(self)
- set = _set_fontName(self, value)
- fontStyle
- font_style
- get = _get_fontStyle(self)
- set = _set_fontStyle(self, value)
- fullName
- full_name
- get = _get_fullName(self)
- set = _set_fullName(self, value)
- full_name
- FL: full_name
- get = _get_full_name(self)
- set = _set_full_name(self, value)
- italicAngle
- italic_angle
- get = _get_italicAngle(self)
- set = _set_italicAngle(self, value)
- license
- license
- get = _get_license(self)
- set = _set_license(self, value)
- licenseURL
- license_url
- get = _get_licenseURL(self)
- set = _set_licenseURL(self, value)
- menuName
- menu_name
- get = _get_menuName(self)
- set = _set_menuName(self, value)
- msCharSet
- ms_charset
- get = _get_msCharSet(self)
- set = _set_msCharSet(self, value)
- ms_charset
- FL: ms_charset
- get = _get_ms_charset(self)
- set = _set_ms_charset(self, value)
- note
- note
- get = _get_note(self)
- set = _set_note(self, value)
- notice
- notice
- get = _get_notice(self)
- set = _set_notice(self, value)
- otFamilyName
- pref_family_name
- get = _get_otFamilyName(self)
- set = _set_otFamilyName(self, value)
- otMacName
- mac_compatible
- get = _get_otMacName(self)
- set = _set_otMacName(self, value)
- otStyleName
- pref_style_name
- get = _get_otStyleName(self)
- set = _set_otStyleName(self, value)
- slantAngle
- slant_angle
- get = _get_slantAngle(self)
- set = _set_slantAngle(self, value)
- styleName
- style_name
- get = _get_styleName(self)
- set = _set_styleName(self, value)
- trademark
- trademark
- get = _get_trademark(self)
- set = _set_trademark(self, value)
- ttUniqueID
- tt_u_id
- get = _get_ttUniqueID(self)
- set = _set_ttUniqueID(self, value)
- ttVendor
- vendor
- get = _get_ttVendor(self)
- set = _set_ttVendor(self, value)
- ttVersion
- tt_version
- get = _get_ttVersion(self)
- set = _set_ttVersion(self, value)
- uniqueID
- unique_id
- get = _get_uniqueID(self)
- set = _set_uniqueID(self, value)
- unitsPerEm
- get = _get_unitsPerEm(self)
- set = _set_unitsPerEm(self, value)
- vendorURL
- vendor_url
- get = _get_vendorURL(self)
- set = _set_vendorURL(self, value)
- versionMajor
- version_major
- get = _get_versionMajor(self)
- set = _set_versionMajor(self, value)
- versionMinor
- version_minor
- get = _get_versionMinor(self)
- set = _set_versionMinor(self, value)
- weightName
- weight name
- get = _get_weightName(self)
- set = _set_weightName(self, value)
- weightValue
- weight value
- get = _get_weightValue(self)
- set = _set_weightValue(self, value)
- widthName
- width name
- get = _get_widthName(self)
- set = _set_widthName(self, value)
- xHeight
- x height value
- get = _get_xHeight(self)
- set = _set_xHeight(self, value)
- year
- year
- get = _get_year(self)
- set = _set_year(self, value)
Methods inherited from robofab.objects.objectsBase.BaseInfo:
- __repr__(self)
- autoNaming(self, familyName=None, styleName=None)
- Automatically set the font naming info based on family and style names.
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- copy(self, aParent=None)
- Duplicate this object. Pass an object for parenting if you want.
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- round(self)
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RKerning(robofab.objects.objectsBase.BaseKerning) |
|
RoboFab wrapper for FL Kerning data |
|
- Method resolution order:
- RKerning
- robofab.objects.objectsBase.BaseKerning
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __add__(self, other)
- Math operations on FL Kerning objects return RF Kerning objects
as they need to be orphaned objects and FL can't deal with that.
- __div__(self, factor)
- Math operations on FL Kerning objects return RF Kerning objects
as they need to be orphaned objects and FL can't deal with that.
- __mul__(self, factor)
- Math operations on FL Kerning objects return RF Kerning objects
as they need to be orphaned objects and FL can't deal with that.
- __rmul__ = __mul__(self, factor)
- __setitem__(self, pair, value)
- __sub__(self, other)
- Math operations on FL Kerning objects return RF Kerning objects
as they need to be orphaned objects and FL can't deal with that.
- clear(self)
- clear all kerning
- update(self, kerningDict)
- replace kerning data with the data in the given kerningDict
Methods inherited from robofab.objects.objectsBase.BaseKerning:
- __getitem__(self, key)
- __init__(self, kerningDict=None)
- __len__(self)
- __repr__(self)
- add(self, value)
- add value to all kerning pairs
- asDict(self, returnIntegers=True)
- return the object as a dictionary
- combine(self, kerningDicts, overwriteExisting=True)
- combine two or more kerning dictionaries.
overwrite exsisting duplicate pairs if overwriteExisting=True
- eliminate(self, leftGlyphsToEliminate=None, rightGlyphsToEliminate=None, analyzeOnly=False)
- eliminate pairs containing a left glyph that is in the leftGlyphsToEliminate list
or a right glyph that is in the rightGlyphsToELiminate list.
sideGlyphsToEliminate can be a string: 'a' or list: ['a', 'b'].
analyzeOnly will not remove pairs. it will return a count
of all pairs that would be removed.
- explodeClasses(self, leftClassDict=None, rightClassDict=None, analyzeOnly=False)
- turn class kerns into real kerning pairs. classes should
be defined in dicts: {'O':['C', 'G', 'Q'], 'H':['B', 'D', 'E', 'F', 'I']}.
analyzeOnly will not remove pairs. it will return a count
of all pairs that would be added
- get(self, pair, default=None)
- get a value. return None if the pair does not exist
- getAverage(self)
- return average of all kerning pairs
- getExtremes(self)
- return the lowest and highest kerning values
- getLeft(self, glyphName)
- Return a list of kerns with glyphName as left character.
- getRight(self, glyphName)
- Return a list of kerns with glyphName as left character.
- has_key(self, pair)
- implodeClasses(self, leftClassDict=None, rightClassDict=None, analyzeOnly=False)
- condense the number of kerning pairs by applying classes.
this will eliminate all pairs containg the classed glyphs leaving
pairs that contain the key glyphs behind. analyzeOnly will not
remove pairs. it will return a count of all pairs that would be removed.
- importAFM(self, path, clearExisting=True)
- Import kerning pairs from an AFM file. clearExisting=True will
clear all exising kerning
- interpolate(self, sourceDictOne, sourceDictTwo, value, clearExisting=True)
- interpolate the kerning between sourceDictOne
and sourceDictTwo. clearExisting will clear existing
kerning first.
- items(self)
- return a list of kerning items
- keys(self)
- return list of kerning pairs
- minimize(self, minimum=10)
- eliminate pairs with value less than minimum
- occurrenceCount(self, glyphsToCount)
- return a dict with glyphs as keys and the number of
occurances of that glyph in the kerning pairs as the value
glyphsToCount can be a string: 'a' or list: ['a', 'b']
- remove(self, pair)
- remove a kerning pair
- round(self, multiple=10)
- round the kerning pair values to increments of multiple
- scale(self, value)
- scale all kernng pairs by value
- swapNames(self, swapTable)
- change glyph names in all kerning pairs based on swapTable.
swapTable = {'BeforeName':'AfterName', ...}
- values(self)
- return a list of kerning values
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- copy(self, aParent=None)
- Duplicate this object. Pass an object for parenting if you want.
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RLib(robofab.objects.objectsBase.BaseLib) |
|
RoboFab wrapper for FL lib |
|
- Method resolution order:
- RLib
- robofab.objects.objectsBase.BaseLib
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __delitem__(self, key)
- __init__(self, aDict)
- __setitem__(self, key, value)
- clear(self)
- pop(self, key)
- popitem(self)
- setdefault(self, key, value=None)
- update(self, aDict)
Methods inherited from robofab.objects.objectsBase.BaseLib:
- __repr__(self)
- copy(self, aParent=None)
- Duplicate this lib.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.BaseLib:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'BaseLib' objects>
- list of weak references to the object (if defined)
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- x.__contains__(y) <==> y in x
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
|
class RPoint(robofab.objects.objectsBase.BasePoint) |
| |
- Method resolution order:
- RPoint
- robofab.objects.objectsBase.BasePoint
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, pointIndex)
- copy(self, aParent=None)
- Copy this object -- result is an ObjectsRF flavored object.
There is no way to make this work using FontLab objects.
Copy is mainly used for glyphmath.
- move(self, (x, y))
- scale(self, (x, y), center=(0, 0))
Properties defined here:
- selected
- get = _get_selected(self)
- set = _set_selected(self, value)
- type
- get = _get_type(self)
- x
- get = _get_x(self)
- set = _set_x(self, value)
- y
- get = _get_y(self)
- set = _set_y(self, value)
Methods inherited from robofab.objects.objectsBase.BasePoint:
- __add__(self, other)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- round(self)
- round the values in the point
- select(self, state=True)
- Set the selection of this point.
XXXX This method should be a lot more versatile, dealing with
different kinds of selection, select the bcp's seperately etc.
But that's for later when we need it more. For now it's just
one flag for the entire thing.
- transform(self, matrix)
- Transform this point. Use a Transform matrix
object from fontTools.misc.transform
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
|
class RSegment(robofab.objects.objectsBase.BaseSegment) |
| |
- Method resolution order:
- RSegment
- robofab.objects.objectsBase.BaseSegment
- robofab.objects.objectsBase.RBaseObject
- __builtin__.object
Methods defined here:
- __init__(self, flNodeIndex)
- copy(self, aParent=None)
- Copy this object -- result is an ObjectsRF flavored object.
There is no way to make this work using FontLab objects.
Copy is mainly used for glyphmath.
- move(self, (x, y))
Properties defined here:
- index
- get = _get_index(self)
- points
- get = _get_points(self)
- selected
- get = _get_selected(self)
- set = _set_selected(self, value)
- smooth
- get = _get_smooth(self)
- set = _set_smooth(self, value)
- type
- get = _get_type(self)
- set = _set_type(self, segmentType)
Methods inherited from robofab.objects.objectsBase.BaseSegment:
- __add__(self, other)
- __mul__(self, factor)
- __repr__(self)
- __rmul__ = __mul__(self, factor)
- __sub__(self, other)
- round(self)
- round all points in the segment
- scale(self, (x, y), center=(0, 0))
- scale the segment
- transform(self, matrix)
- Transform this segment.
Use a Transform matrix object from
robofab.transform
Properties inherited from robofab.objects.objectsBase.BaseSegment:
- offCurve
- on curve point for the segment
- get = _get_offCurve(self)
- onCurve
- list of off curve points for the segment
- get = _get_onCurve(self)
Methods inherited from robofab.objects.objectsBase.RBaseObject:
- __len__(self)
- dump(self, private=False)
- Print a dump of this object to the std out.
- getParent(self)
- this method will be overwritten with a weakref if there is a parent.
- isRobofab(self)
- Presence of this method indicates a Robofab object
- naked(self)
- Return the wrapped object itself, in case it is needed for direct access.
- setChanged(self, state=True)
- setParent(self, parent)
Data and other attributes inherited from robofab.objects.objectsBase.RBaseObject:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
- list of weak references to the object (if defined)
- attrMap = {}
| |