diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-01-09 14:00:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-09 13:00:18 +0000 |
| commit | 9473aface183feaf48601c5264c3604f5798169e (patch) | |
| tree | 9b515f752b931c83ea2a17b68938d4ed7faceba0 /crates/typst-library/src | |
| parent | be6629c7cbd00b06beab2b1477c4270859906cb2 (diff) | |
Fix memory size of `TextElem` (#5674)
Diffstat (limited to 'crates/typst-library/src')
| -rw-r--r-- | crates/typst-library/src/text/mod.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/typst-library/src/text/mod.rs b/crates/typst-library/src/text/mod.rs index 25ed009e..d372c399 100644 --- a/crates/typst-library/src/text/mod.rs +++ b/crates/typst-library/src/text/mod.rs @@ -555,6 +555,7 @@ pub struct TextElem { /// #lorem(10) /// ``` #[fold] + #[ghost] pub costs: Costs, /// Whether to apply kerning. @@ -1431,3 +1432,13 @@ fn check_font_list(engine: &mut Engine, list: &Spanned<FontList>) { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_text_elem_size() { + assert_eq!(std::mem::size_of::<TextElem>(), std::mem::size_of::<EcoString>()); + } +} |
