Formatting

This commit is contained in:
Laurenz 2025-03-26 18:13:19 +01:00
parent c741b532d9
commit 6d0bcbc46a
3 changed files with 7 additions and 5 deletions

View File

@ -407,14 +407,14 @@ fn finish(
let code_point = cp.map(|c| format!("{:#06x}", c as u32)); let code_point = cp.map(|c| format!("{:#06x}", c as u32));
if let Some(cp) = code_point { if let Some(cp) = code_point {
let msg = if loc.is_some() { let msg = if loc.is_some() {
"the PDF contains text with" "the PDF contains text with"
} else { } else {
"the text contains" "the text contains"
}; };
error!(get_span(*loc), "{prefix} {msg} the disallowed \ error!(get_span(*loc), "{prefix} {msg} the disallowed \
codepoint {cp}") codepoint {cp}")
} else { } else {
// I think this code path is in theory unreachable, // I think this code path is in theory unreachable,
// but just to be safe. // but just to be safe.
let msg = if loc.is_some() { "the PDF contains text with missing codepoints" } else { "the text was not mapped to a code point" }; let msg = if loc.is_some() { "the PDF contains text with missing codepoints" } else { "the text was not mapped to a code point" };
error!(get_span(*loc), "{prefix} {msg}"; error!(get_span(*loc), "{prefix} {msg}";

View File

@ -1,10 +1,11 @@
use crate::convert::GlobalContext;
use ecow::EcoString; use ecow::EcoString;
use krilla::metadata::{Metadata, TextDirection}; use krilla::metadata::{Metadata, TextDirection};
use typst_library::foundations::{Datetime, Smart}; use typst_library::foundations::{Datetime, Smart};
use typst_library::layout::Dir; use typst_library::layout::Dir;
use typst_library::text::Lang; use typst_library::text::Lang;
use crate::convert::GlobalContext;
pub(crate) fn build_metadata(gc: &GlobalContext) -> Metadata { pub(crate) fn build_metadata(gc: &GlobalContext) -> Metadata {
let creator = format!("Typst {}", env!("CARGO_PKG_VERSION")); let creator = format!("Typst {}", env!("CARGO_PKG_VERSION"));

View File

@ -1,6 +1,7 @@
use std::num::NonZeroUsize;
use krilla::destination::XyzDestination; use krilla::destination::XyzDestination;
use krilla::outline::{Outline, OutlineNode}; use krilla::outline::{Outline, OutlineNode};
use std::num::NonZeroUsize;
use typst_library::foundations::{NativeElement, Packed, StyleChain}; use typst_library::foundations::{NativeElement, Packed, StyleChain};
use typst_library::layout::Abs; use typst_library::layout::Abs;
use typst_library::model::HeadingElem; use typst_library::model::HeadingElem;