mirror of
https://github.com/typst/typst
synced 2025-08-15 15:38:33 +08:00
Improve error message for invalid codepoints
This commit is contained in:
parent
b61505c893
commit
48f833c79a
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1313,7 +1313,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "krilla"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/LaurenzV/krilla?rev=d4dedf7#d4dedf71cc39f8fa5e8c8dc2a69eed164e0f8358"
|
||||
source = "git+https://github.com/LaurenzV/krilla?rev=ffdd1aa#ffdd1aa56a5c70711cc2863ce056cc2925bf4468"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bumpalo",
|
||||
|
@ -70,7 +70,7 @@ if_chain = "1"
|
||||
image = { version = "0.25.2", default-features = false, features = ["png", "jpeg", "gif"] }
|
||||
indexmap = { version = "2", features = ["serde"] }
|
||||
kamadak-exif = "0.5"
|
||||
krilla = { git = "https://github.com/LaurenzV/krilla", rev = "d4dedf7", features = ["comemo", "rayon", "svg"] }
|
||||
krilla = { git = "https://github.com/LaurenzV/krilla", rev = "ffdd1aa", features = ["comemo", "rayon", "svg"] }
|
||||
kurbo = "0.11"
|
||||
libfuzzer-sys = "0.4"
|
||||
lipsum = "0.9"
|
||||
|
@ -385,10 +385,12 @@ fn finish(document: Document, gc: GlobalContext) -> SourceResult<Vec<u8>> {
|
||||
hint: "ensure all text can be displayed using an available font");
|
||||
}
|
||||
ValidationError::InvalidCodepointMapping(_, _) => {
|
||||
bail!(Span::detached(), "{prefix} the PDF contains the \
|
||||
disallowed codepoints";
|
||||
hint: "make sure to not use the Unicode characters 0x0, \
|
||||
0xFEFF or 0xFFFE");
|
||||
bail!(Span::detached(), "{prefix} the PDF contains \
|
||||
disallowed codepoints or is missing codepoint mappings";
|
||||
hint: "make sure to not use the unicode characters 0x0, \
|
||||
0xFEFF or 0xFFFE";
|
||||
hint: "for complex scripts like indic or arabic, it might \
|
||||
not be possible to produce a compliant document");
|
||||
}
|
||||
ValidationError::UnicodePrivateArea(_, _) => {
|
||||
bail!(Span::detached(), "{prefix} the PDF contains characters from the \
|
||||
|
Loading…
x
Reference in New Issue
Block a user