Skip to main content

Module text

Module text 

Source

Structs§

Bar
a word drawn as one bar when its text is small (em, from its line’s origin): from its ink’s left to its right, from the baseline to the x-height, ink the share of that box its glyphs cover
FontId
a font of a scene (Scene::add_font)
FontMetrics
a font’s metrics in em units (Fonts::metrics)
Fonts
the fonts of a scene (or of anyone laying out text: the CPU path of G6e)
GlyphShape
what a scene knows of a glyph: its contours (em), the box of its control hulls, the area it fills
Layout
a text laid out: in em units of its frame, and the frame
Line
a line of a layout: its baseline’s origin (em, in the frame), its glyphs (a range of Layout::glyphs) and bars, its advance width (em)
MText
text of several lines (the basics of DXF’s MTEXT: explicit breaks, a wrapping width, line spacing, the nine attachment points, rotation; its inline formatting codes are G6e’s, which maps them onto runs). Made with new and changed field by field (it may grow: runs with their own font, height and colour)
Placed
a glyph of a layout
Text
a single line of text (DXF’s TEXT). Made with new and changed field by field (it may grow)
TextStyle
DXF’s STYLE: how texts of it look. Made with new and changed field by field (it may grow)
TextStyleId
a text style of a scene (Scene::add_text_style)

Enums§

Attach
MTEXT’s attachment point (group 71, 1 to 9): where at lies on the text’s block
HAlign
DXF TEXT’s horizontal alignment (group 72)
VAlign
DXF TEXT’s vertical alignment (group 73): the baseline, the font’s descender, half the cap height, the cap height

Constants§

FALLBACK_MAX
the most fallback fonts of a text style
LINE_SPACING
AutoCAD’s single line spacing: baselines 5/3 of the text height apart (MText::line_spacing multiplies it)

Functions§

layout_mtext
text of several lines laid out (the basics of DXF MTEXT)
layout_text
a single line laid out (DXF TEXT)