Module text

Module text 

Source
Expand description

Text elements: text, tspan, tref.

Modules§

directional_formatting_characters
Constants with Unicode’s directional formatting characters

Structs§

BidiControl
Unicode control characters to be inserted when unicode-bidi is specified.
Chars
In SVG text elements, we use Chars to store character data. For example, an element like <text>Foo Bar</text> will be a Text with a single child, and the child will be a Chars with “Foo Bar” for its contents.
Chunk 🔒
An absolutely-positioned array of Spans
LayoutContext 🔒
The state of a text layout operation.
LayoutSpan 🔒
A laid-out and resolved text span.
MeasuredChunk 🔒
MeasuredSpan 🔒
PangoUnits 🔒
Use as PangoUnits::from_pixels() so that we can check for overflow.
PositionedChunk 🔒
PositionedSpan 🔒
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 specified chunks array.
compute_baseline_offset 🔒
compute_text_box 🔒
create_pango_layout 🔒
Returns None if 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.