mirror of https://github.com/stelzo/typst.git
Fix memory size of `TextElem` (#5674)
This commit is contained in:
parent
be6629c7cb
commit
9473aface1
|
|
@ -555,6 +555,7 @@ pub struct TextElem {
|
||||||
/// #lorem(10)
|
/// #lorem(10)
|
||||||
/// ```
|
/// ```
|
||||||
#[fold]
|
#[fold]
|
||||||
|
#[ghost]
|
||||||
pub costs: Costs,
|
pub costs: Costs,
|
||||||
|
|
||||||
/// Whether to apply kerning.
|
/// 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>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue