2024-09-16 12:48:15 +01:00
|
|
|
###########################################
|
|
|
|
pens: Inspect and manipulate glyph outlines
|
|
|
|
###########################################
|
2017-04-21 19:47:28 -03:00
|
|
|
|
2024-09-17 17:24:45 +01:00
|
|
|
.. rubric:: Overview:
|
|
|
|
:heading-level: 3
|
|
|
|
|
|
|
|
The fontTools **pens** are a collection of classes that can operate
|
|
|
|
on a font glyph via the points and the contours of the glyph's outlines.
|
|
|
|
|
|
|
|
Some pens trace through the outlines and generate graphical output,
|
|
|
|
such as a new glyph outline or a formatted image, but other
|
|
|
|
pens analyze the outlines and return information about the glyph.
|
|
|
|
|
2024-09-17 17:36:33 +01:00
|
|
|
Pens that alter or produce a pen-compatible :class:`.ttGlyph` object can
|
2024-09-17 17:24:45 +01:00
|
|
|
be chained together.
|
|
|
|
|
2024-09-17 17:36:33 +01:00
|
|
|
New pens can be written by sub-classing the :class:`.AbstractPen` or,
|
|
|
|
somewhat more practically, :class:`.BasePen` classes. The Pen Protocol is
|
|
|
|
documented on the :ref:`basePen` page.
|
2024-09-17 17:24:45 +01:00
|
|
|
|
2024-09-17 17:36:33 +01:00
|
|
|
.. rubric:: Pen modules:
|
2024-09-17 17:24:45 +01:00
|
|
|
:heading-level: 3
|
|
|
|
|
2017-04-21 19:47:28 -03:00
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
|
2018-10-10 21:43:31 -04:00
|
|
|
areaPen
|
2017-04-21 19:47:28 -03:00
|
|
|
basePen
|
|
|
|
boundsPen
|
2018-10-10 21:43:31 -04:00
|
|
|
cocoaPen
|
2020-04-21 11:13:42 +01:00
|
|
|
cu2quPen
|
2017-04-21 19:47:28 -03:00
|
|
|
filterPen
|
2022-01-10 23:51:28 +09:00
|
|
|
freetypePen
|
2018-10-10 21:43:31 -04:00
|
|
|
momentsPen
|
|
|
|
perimeterPen
|
|
|
|
pointInsidePen
|
2020-04-21 11:13:42 +01:00
|
|
|
pointPen
|
2018-10-10 21:43:31 -04:00
|
|
|
qtPen
|
2017-04-21 19:47:28 -03:00
|
|
|
recordingPen
|
2020-04-22 00:07:03 -04:00
|
|
|
reportLabPen
|
2018-10-10 21:43:31 -04:00
|
|
|
reverseContourPen
|
2020-04-21 11:13:42 +01:00
|
|
|
roundingPen
|
2018-10-10 21:43:31 -04:00
|
|
|
statisticsPen
|
|
|
|
svgPathPen
|
|
|
|
t2CharStringPen
|
2017-04-21 19:47:28 -03:00
|
|
|
teePen
|
2018-10-10 21:43:31 -04:00
|
|
|
transformPen
|
|
|
|
ttGlyphPen
|
|
|
|
wxPen
|
|
|
|
|