Expand description
Text elements: text, tspan, tref.
Modules§
- directional_
formatting_ characters - Constants with Unicode’s directional formatting characters
Structs§
- Bidi
Control - Unicode control characters to be inserted when
unicode-bidiis specified. - Chars
- In SVG text elements, we use
Charsto store character data. For example, an element like<text>Foo Bar</text>will be aTextwith a single child, and the child will be aCharswith “Foo Bar” for its contents. - Chunk 🔒
- An absolutely-positioned array of
Spans - Layout
Context 🔒 - The state of a text layout operation.
- Layout
Span 🔒 - A laid-out and resolved text span.
- Measured
Chunk 🔒 - Measured
Span 🔒 - Pango
Units 🔒 - Use as
PangoUnits::from_pixels()so that we can check for overflow. - Positioned
Chunk 🔒 - Positioned
Span 🔒 - Span 🔒
- TRef
- TSpan
- Text
Functions§
- add_
pango_ 🔒attributes - Adds Pango attributes, suitable for a span of text, to an
AttrList. - children_
to_ 🔒chunks - Walks the children of a
<text>,<tspan>, or<tref>element and appends chunks/spans from them into the specifiedchunksarray. - compute_
baseline_ 🔒offset - compute_
text_ 🔒box - create_
pango_ 🔒layout - Returns
Noneif the layout would be invalid due to, for example, out-of-bounds font sizes. - extract_
chars_ 🔒children_ to_ chunks_ recursively - gravity_
is_ 🔒vertical - parse_
list_ 🔒and_ extract_ first - text_
anchor_ 🔒offset - Computes the (x, y) offsets to be applied to spans after applying the text-anchor property (start, middle, end).
- wrap_
with_ 🔒direction_ control_ chars - Prepends and appends Unicode directional formatting characters.