mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-16 08:35:26 +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:
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