From 148a06c070e6376e6f86b878d08dfd4f0aef8a73 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 24 Aug 2021 00:39:43 +0200 Subject: Switch from state to decorations for underline/strikethrough/overline --- src/eval/state.rs | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/eval/state.rs') diff --git a/src/eval/state.rs b/src/eval/state.rs index 05558915..d7ca014d 100644 --- a/src/eval/state.rs +++ b/src/eval/state.rs @@ -140,12 +140,6 @@ pub struct FontState { /// A list of font families with generic class definitions (the final /// family list also depends on `monospace`). pub families: Rc, - /// The specifications for a strikethrough line, if any. - pub strikethrough: Option>, - /// The specifications for a underline, if any. - pub underline: Option>, - /// The specifications for a overline line, if any. - pub overline: Option>, } impl FontState { @@ -212,9 +206,6 @@ impl Default for FontState { top_edge: VerticalFontMetric::CapHeight, bottom_edge: VerticalFontMetric::Baseline, fill: Paint::Color(Color::Rgba(RgbaColor::BLACK)), - strikethrough: None, - underline: None, - overline: None, } } } @@ -248,19 +239,3 @@ impl Default for FamilyState { } } } - -/// Defines a line that is positioned over, under or on top of text. -#[derive(Debug, Clone, Eq, PartialEq, Hash)] -pub struct LineState { - /// Stroke color of the line, defaults to the text color if `None`. - pub stroke: Option, - /// Thickness of the line's strokes (dependent on scaled font size), read - /// from the font tables if `None`. - pub thickness: Option, - /// Position of the line relative to the baseline (dependent on scaled font - /// size), read from the font tables if `None`. - pub offset: Option, - /// Amount that the line will be longer or shorter than its associated text - /// (dependent on scaled font size). - pub extent: Linear, -} -- cgit v1.2.3