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: usizeA span start in bytes.
Offset is relative to the parent text chunk and not the parent text element.
end: usizeA 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: PaintOrderA paint order style.
font: FontA font.
font_size: NonZeroPositiveF32A font size.
small_caps: boolIndicates that small caps should be used.
Set by font-variant="small-caps"
apply_kerning: boolIndicates that a kerning should be applied.
Supports both kerning and font-kerning properties.
decoration: TextDecorationA span decorations.
dominant_baseline: DominantBaselineA span dominant baseline.
alignment_baseline: AlignmentBaselineA 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: VisibilityA visibility property.
letter_spacing: f32A letter spacing property.
word_spacing: f32A word spacing property.
text_length: Option<f32>A text length property.
length_adjust: LengthAdjustA length adjust property.