mirror of
https://github.com/typst/typst
synced 2025-08-15 15:38:33 +08:00
Formatting
This commit is contained in:
parent
c741b532d9
commit
6d0bcbc46a
@ -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}";
|
||||||
|
@ -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"));
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user