//! Text decorations. use super::prelude::*; use super::TextNode; /// Typeset underline, striken-through or overlined text. #[derive(Debug, Hash)] pub struct DecoNode(pub Template); #[class] impl DecoNode { /// Stroke color of the line, defaults to the text color if `None`. #[shorthand] pub const STROKE: Option = None; /// Thickness of the line's strokes (dependent on scaled font size), read /// from the font tables if `None`. #[shorthand] pub const THICKNESS: Option = None; /// Position of the line relative to the baseline (dependent on scaled font /// size), read from the font tables if `None`. pub const OFFSET: Option = None; /// Amount that the line will be longer or shorter than its associated text /// (dependent on scaled font size). pub const EXTENT: Linear = Linear::zero(); /// Whether the line skips sections in which it would collide /// with the glyphs. Does not apply to strikethrough. pub const EVADE: bool = true; fn construct(_: &mut Context, args: &mut Args) -> TypResult