summaryrefslogtreecommitdiffstats
path: root/core/src/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/text.rs')
-rw-r--r--core/src/text.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/src/text.rs b/core/src/text.rs
index c144fd24..8dde9e21 100644
--- a/core/src/text.rs
+++ b/core/src/text.rs
@@ -270,6 +270,23 @@ pub struct Span<'a, Link = (), Font = crate::Font> {
pub strikethrough: bool,
}
+impl<Link, Font> Default for Span<'_, Link, Font> {
+ fn default() -> Self {
+ Self {
+ text: Cow::default(),
+ size: None,
+ line_height: None,
+ font: None,
+ color: None,
+ link: None,
+ highlight: None,
+ padding: Padding::default(),
+ underline: false,
+ strikethrough: false,
+ }
+ }
+}
+
/// A text highlight.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Highlight {