diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-02-17 11:55:28 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-02-17 13:28:04 +0100 |
| commit | ab95627d873239182e7b28b266f8b9f9da5cdbb1 (patch) | |
| tree | ae6589d60d32a7ae884326911600c733dc32d977 /src/library/text.rs | |
| parent | 5965515a1ef1fe398235311185d531efc2750247 (diff) | |
Switch to const generics for nodes
Diffstat (limited to 'src/library/text.rs')
| -rw-r--r-- | src/library/text.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/library/text.rs b/src/library/text.rs index 1ccbb1c6..4ee64e7a 100644 --- a/src/library/text.rs +++ b/src/library/text.rs @@ -9,7 +9,7 @@ use rustybuzz::{Feature, UnicodeBuffer}; use ttf_parser::{GlyphId, OutlineBuilder, Tag}; use super::prelude::*; -use super::{DecoLine, Decoration}; +use super::Decoration; use crate::font::{ Face, FaceId, FontStore, FontStretch, FontStyle, FontVariant, FontWeight, VerticalFontMetric, @@ -826,12 +826,12 @@ impl<'a> ShapedText<'a> { ) { let face = fonts.get(text.face_id); let metrics = match deco.line { - DecoLine::Underline => face.underline, - DecoLine::Strikethrough => face.strikethrough, - DecoLine::Overline => face.overline, + super::STRIKETHROUGH => face.strikethrough, + super::OVERLINE => face.overline, + super::UNDERLINE | _ => face.underline, }; - let evade = deco.evade && deco.line != DecoLine::Strikethrough; + let evade = deco.evade && deco.line != super::STRIKETHROUGH; let extent = deco.extent.resolve(text.size); let offset = deco .offset |
