Expand description
Text in a sketch: the outlines of a string’s glyphs, closed contours
of exact NURBS (see crate::CurveKind::Text).
The font is Noto Sans Regular, by the Noto Project Authors, under the
SIL Open Font License 1.1 (fonts/OFL.txt; it reserves no font name).
It is embedded as a subset (fonts/NotoSans-Regular-subset.ttf, made
with fontTools.subset): Basic Latin, Latin-1, dashes, quotes, the
bullet, the ellipsis, the minus, the euro and the trade mark sign;
hinting and layout tables dropped, overlapping contours united
(fontTools.ttLib.removeOverlaps), so that no two contours of a glyph
cross and each is a loop of the sketch’s profile. A character the font
has no glyph of is drawn as its missing glyph, a box.
A TrueType outline is lines and quadratic Béziers between points of whole font units, so it is a NURBS exactly. A run of quadratics each starting halfway between the control points either side of it — a TrueType “implied” point — is one quadratic B-spline on uniform knots, the off-curve points its control points: so it is one piece, which the extrusion makes one face, not a face per Bézier.
Structs§
- Contour
- A closed contour of a glyph: pieces each starting where the one before ends, the last ending where the first starts — at least two of them, so every joint between them is one of the contour’s own.
- Outline
Piece - One piece of a contour: a polynomial B-spline of
degreethroughpoints, its control points, on clamped uniform knots — a line, a quadratic or a cubic Bézier, or a run of quadratics joined smoothly.
Functions§
- outlines
- The contours of
textset in the sketch font, in font units: its first baseline along thexaxis from the origin, each line below the one before by the font’s line spacing. - place
contoursplaced in the sketch: their origin atanchor, scaled so a capital isheighttall, turned counter-clockwise byangleradians — each a loop of NURBS pieces on[0, 1].
Type Aliases§
- Font
Point - A point of an outline, in font units.