| |
- fontTools.pens.basePen.BasePen(fontTools.pens.basePen.AbstractPen)
-
- FabToSVGPen
- Description
- ExtractGlyphFromSVG
- Line
- SVGDocument
- SVGPath
class FabToSVGPen(fontTools.pens.basePen.BasePen) |
|
A pen to create and draw the glyph as a path object into a SVG document. |
|
- Method resolution order:
- FabToSVGPen
- fontTools.pens.basePen.BasePen
- fontTools.pens.basePen.AbstractPen
Methods defined here:
- __init__(self, glyphSet)
- drawProportions(self)
- Additional boundinbox, baseline, xheight as simple lines.
- setName(self, name)
- setParentPath(self, parentPath)
- setUnicode(self, unicode)
- setWidth(self, width)
- write(self, filePath=None)
- Finally, make an SVG document, add the path and save to file.
Methods inherited from fontTools.pens.basePen.BasePen:
- addComponent(self, glyphName, transformation)
- This default implementation simply transforms the points
of the base glyph and draws it onto self.
- closePath(self)
- curveTo(self, *points)
- endPath(self)
- lineTo(self, pt)
- moveTo(self, pt)
- qCurveTo(self, *points)
|
class Line |
|
<line x1="100" y1="300" x2="300" y2="100" stroke-width="5" /> |
|
Methods defined here:
- __init__(self, (x1, y1), (x2, y2), strokeWidth=1, strokeColor=None)
- write(self)
|
class SVGDocument |
|
Very basic container for SVG data. |
|
Methods defined here:
- __init__(self, (width, height), units='pt')
- add(self, item)
- comment(self, text)
- save(self, path=None)
- scale(self, (sx, sy))
- setStrokeColor(self, colorName)
- translate(self, (dx, dy))
|
class SVGPath |
|
Path object for SVG vector paths. |
|
Methods defined here:
- __init__(self, fillColor=None, strokeColor=None, strokeWidth=None)
- closePath(self)
- curveTo(self, (x1, y1, x2, y2, x3, y3))
- lineTo(self, (x, y))
- moveTo(self, (x, y))
- qCurveTo(self, (x1, y1, x2, y2))
- write(self)
- <path d="M200,300 L400,50 L600,300
L800,550 L1000,300"
fill="none" stroke="#888888" stroke-width="2" />
| |