diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-17 13:25:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-17 13:26:49 +0200 |
| commit | 9bdc4a7de0fb685fa2b8d02280e70aa0b5d92bf9 (patch) | |
| tree | e67c75c32183e734272943107ad2d034b1e8e818 /library/src/text/mod.rs | |
| parent | 428c55b6eed3536bb228924c6fb0ad6cea6d6d4b (diff) | |
Write PDF outline
Diffstat (limited to 'library/src/text/mod.rs')
| -rw-r--r-- | library/src/text/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index 16268aad..f4b3c0de 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -40,7 +40,7 @@ use crate::prelude::*; /// /// Display: Text /// Category: text -#[element(Construct)] +#[element(Construct, PlainText)] pub struct TextElem { /// A prioritized sequence of font families. /// @@ -497,6 +497,12 @@ impl Construct for TextElem { } } +impl PlainText for TextElem { + fn plain_text(&self, text: &mut EcoString) { + text.push_str(&self.text()); + } +} + /// A lowercased font family like "arial". #[derive(Clone, Eq, PartialEq, Hash)] pub struct FontFamily(EcoString); |
