From 2f2dd179385b4e78fcfb0a38aafc433cbb86b10a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 18 Dec 2023 14:15:22 +0100 Subject: Bump svg2pdf and related crates (#2992) --- crates/typst-render/src/lib.rs | 2 +- crates/typst-svg/src/lib.rs | 2 +- crates/typst/src/diag.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/typst-render/src/lib.rs b/crates/typst-render/src/lib.rs index 79ec75b8..393f86cf 100644 --- a/crates/typst-render/src/lib.rs +++ b/crates/typst-render/src/lib.rs @@ -254,7 +254,7 @@ fn render_svg_glyph( id: GlyphId, ) -> Option<()> { let ts = &state.transform; - let mut data = text.font.ttf().glyph_svg_image(id)?; + let mut data = text.font.ttf().glyph_svg_image(id)?.data; // Decompress SVGZ. let mut decoded = vec![]; diff --git a/crates/typst-svg/src/lib.rs b/crates/typst-svg/src/lib.rs index 04a24ebf..92168fc6 100644 --- a/crates/typst-svg/src/lib.rs +++ b/crates/typst-svg/src/lib.rs @@ -1108,7 +1108,7 @@ fn convert_bitmap_glyph_to_image(font: &Font, id: GlyphId) -> Option<(Image, f64 /// Convert an SVG glyph to an encoded image URL. #[comemo::memoize] fn convert_svg_glyph_to_base64_url(font: &Font, id: GlyphId) -> Option { - let mut data = font.ttf().glyph_svg_image(id)?; + let mut data = font.ttf().glyph_svg_image(id)?.data; // Decompress SVGZ. let mut decoded = vec![]; diff --git a/crates/typst/src/diag.rs b/crates/typst/src/diag.rs index a8142f3f..3a0f4f9b 100644 --- a/crates/typst/src/diag.rs +++ b/crates/typst/src/diag.rs @@ -479,7 +479,7 @@ impl From for EcoString { /// Format a user-facing error message for an XML-like file format. pub fn format_xml_like_error(format: &str, error: roxmltree::Error) -> EcoString { match error { - roxmltree::Error::UnexpectedCloseTag { expected, actual, pos } => { + roxmltree::Error::UnexpectedCloseTag(expected, actual, pos) => { eco_format!( "failed to parse {format} (found closing tag '{actual}' \ instead of '{expected}' in line {})", -- cgit v1.2.3