pub struct Text {
pub id: String,
pub rendering_mode: TextRendering,
pub dx: Vec<f32>,
pub dy: Vec<f32>,
pub rotate: Vec<f32>,
pub writing_mode: WritingMode,
pub chunks: Vec<TextChunk>,
pub bounding_box: Option<NonZeroRect>,
pub flattened: Option<Node>,
}Expand description
A text element.
text element in SVG.
Fields§
§id: StringElement’s ID.
Taken from the SVG itself. Isn’t automatically generated. Can be empty.
rendering_mode: TextRenderingRendering mode.
text-rendering in SVG.
dx: Vec<f32>A relative X axis offsets.
One offset for each Unicode codepoint. Aka char in Rust.
dy: Vec<f32>A relative Y axis offsets.
One offset for each Unicode codepoint. Aka char in Rust.
rotate: Vec<f32>A list of rotation angles.
One angle for each Unicode codepoint. Aka char in Rust.
writing_mode: WritingModeA writing mode.
chunks: Vec<TextChunk>A list of text chunks.
bounding_box: Option<NonZeroRect>Contains a text bounding box.
Text bounding box is special in SVG and doesn’t represent a tight bounding box of the element’s content. You can find more about it here.
Will be set by
usvg_text_layout::TreeTextToPath::convert_text
flattened: Option<Node>Text converted into paths, ready to render.
Will be set by
usvg_text_layout::TreeTextToPath::convert_text