mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 04:22:20 +00:00
Give the Type 3 widths warning a flag in the decoded image cache's warning set
Patch 90 adds InterpreterWarning::Type3WidthsMissing and patch 91 matches every warning to a flag, so the merged match needs the new variant.
This commit is contained in:
1 parent
e2f65dbf5a
commit
e49055053f
1 file changed
+2
Vendored
+2
@@ -141,6 +141,7 @@ fn warning_bit(warning: InterpreterWarning) -> u8 {
|
||||
InterpreterWarning::ImageDecodeFailure => 2,
|
||||
InterpreterWarning::ContentTruncated => 4,
|
||||
InterpreterWarning::ColorFallback => 8,
|
||||
InterpreterWarning::Type3WidthsMissing => 16,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +152,7 @@ fn warnings_in(bits: u8) -> impl Iterator<Item = InterpreterWarning> {
|
||||
InterpreterWarning::ImageDecodeFailure,
|
||||
InterpreterWarning::ContentTruncated,
|
||||
InterpreterWarning::ColorFallback,
|
||||
InterpreterWarning::Type3WidthsMissing,
|
||||
]
|
||||
.into_iter()
|
||||
.filter(move |warning| bits & warning_bit(*warning) != 0)
|
||||
|
||||
Reference in new issue
Block a user