Fix memory size of TextElem (#5674)

This commit is contained in:
Laurenz 2025-01-09 14:00:18 +01:00 committed by GitHub
parent be6629c7cb
commit 9473aface1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>());
}
}