Expand description
Text layout for slide text bodies.
layout resolves every run’s formatting through the placeholder/style chain and lays each
paragraph out in the order bidirectional text needs:
- embedding levels for the whole logical paragraph (UAX #9, base level from
a:pPr/@rtl); - itemization by level, script, face (per-cluster fallback through the
a:latin/a:ea/a:csslots and the theme’s script fonts) and shaping style, each item shaped with the whole paragraph as context; paint-only attributes (colour, highlight, underline) never split a word, so Arabic joining and ligatures survive them; - line breaking in logical order (UAX #14 opportunities at cluster boundaries, greedy fill);
- per line, rules L1/L2 reorder the characters visually (L4 mirroring is done by the shaper).
It then places bullets and numbers from the paragraph’s start edge (the right edge for RTL
paragraphs), applies indents, spacing and alignment (kashida for justLow), anchors the block
in the shape’s text box, and shrinks text on overflow when the body asks for it. The result is
positioned glyph runs in shape-local coordinates plus per-line caret geometry for editing:
bidirectional carets with affinity, logical and visual movement, and selection as the union of
visual boxes.
Modules§
- datetime
- Date and time fields (
a:fld type="datetime…"): the text each field type shows for a moment, and the local clock.
Structs§
- Deco
- An underline, strikethrough or highlight box.
- Glyph
Run - A run of glyphs in one face, size and colour.
- Line
Info - NoFields
- Opts
- Pos
- A caret position: paragraph and character offset within it.
- RunEffects
- A text run’s shadow and glow, colours resolved.
- Text
Layout - Text
Shadow - An outer shadow: colour (with its alpha), blur radius and offset in points.
Enums§
- Affinity
- Which side of a boundary a caret belongs to:
Downstreamsticks to the character after it (the default),Upstreamto the character before it, which differs at direction changes and at the end of a wrapped line. - Move
Mode - Caret movement: through the text order, or across the screen.
Traits§
- Fields
- Values for fields (
slidenum,datetime…,footer).Nonekeeps the field’s saved text.
Functions§
- autonum
- Text of an auto-number bullet:
arabicPeriod3 → “3.”. - fit_
height - Height the shape needs so its text fits (Resize shape to fit text): text height + insets.
- fit_
width - Width a non-wrapping text box needs.
- layout
- Lay out a shape’s text body.
- symbol_
char - The character that draws
c, a character of text set in the symbol fontfont(Wingdings, Symbol, Webdings…: its code, or U+F000 + its code), withface: the installed symbol font’s own glyph whenfaceis that font, else a Unicode look-alike as bullets use. None whenfontis not a symbol font orcis not a symbol code. Metafile text takes this path.