pub struct TextSpan {Show 18 fields
pub start: usize,
pub end: usize,
pub fill: Option<Fill>,
pub stroke: Option<Stroke>,
pub paint_order: PaintOrder,
pub font: Font,
pub font_size: NonZeroPositiveF32,
pub small_caps: bool,
pub apply_kerning: bool,
pub decoration: TextDecoration,
pub dominant_baseline: DominantBaseline,
pub alignment_baseline: AlignmentBaseline,
pub baseline_shift: Vec<BaselineShift>,
pub visibility: Visibility,
pub letter_spacing: f32,
pub word_spacing: f32,
pub text_length: Option<f32>,
pub length_adjust: LengthAdjust,
}
Expand description
A text style span.
Spans do not overlap inside a text chunk.
Fields§
§start: usize
A span start in bytes.
Offset is relative to the parent text chunk and not the parent text element.
end: usize
A span end in bytes.
Offset is relative to the parent text chunk and not the parent text element.
fill: Option<Fill>
A fill style.
stroke: Option<Stroke>
A stroke style.
paint_order: PaintOrder
A paint order style.
font: Font
A font.
font_size: NonZeroPositiveF32
A font size.
small_caps: bool
Indicates that small caps should be used.
Set by font-variant="small-caps"
apply_kerning: bool
Indicates that a kerning should be applied.
Supports both kerning
and font-kerning
properties.
decoration: TextDecoration
A span decorations.
dominant_baseline: DominantBaseline
A span dominant baseline.
alignment_baseline: AlignmentBaseline
A span alignment baseline.
baseline_shift: Vec<BaselineShift>
A list of all baseline shift that should be applied to this span.
Ordered from text
element down to the actual span
element.
visibility: Visibility
A visibility property.
letter_spacing: f32
A letter spacing property.
word_spacing: f32
A word spacing property.
text_length: Option<f32>
A text length property.
length_adjust: LengthAdjust
A length adjust property.