Don't clone in display_font

This commit is contained in:
Laurenz 2025-03-27 10:18:18 +01:00
parent 8d58e747c8
commit d2b2a6fa8d

View File

@ -96,9 +96,8 @@ impl AbsExt for Abs {
} }
/// Display the font family of a font. /// Display the font family of a font.
pub(crate) fn display_font(font: &Font) -> String { pub(crate) fn display_font(font: &Font) -> &str {
let font_family = &font.info().family; &font.info().family
font_family.to_string()
} }
/// Convert a typst path to a krilla path. /// Convert a typst path to a krilla path.