Expand description
Text elements: text
, tspan
, tref
.
Modules§
- Constants with Unicodeβs directional formatting characters
Structs§
- BidiControl πUnicode control characters to be inserted when
unicode-bidi
is specified. - In SVG text elements, we use
Chars
to store character data. For example, an element like<text>Foo Bar</text>
will be aText
with a single child, and the child will be aChars
with βFoo Barβ for its contents. - Chunk πAn absolutely-positioned array of
Span
s - 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 π
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 specifiedchunks
array. - compute_text_box π
- create_pango_layout πReturns
None
if the layout would be invalid due to, for example, out-of-bounds font sizes. - gravity_is_vertical π
- text_anchor_offset πComputes the (x, y) offsets to be applied to spans after applying the text-anchor property (start, middle, end).
- Prepends and appends Unicode directional formatting characters.