mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
LibPDF: Fix small bug from #21452
I implemented CFF charset format 2 in 6f783929dd
with the note
"I haven't seen this being used in the wild". Now that I have
seen it (0000658.pdf), I can say that this has never worked,
despite me claiming "it's easy to implement".
But now it works!
This commit is contained in:
parent
93ee01041f
commit
32f601f9a4
Notes:
sideshowbarker
2024-07-17 07:19:27 +09:00
Author: https://github.com/nico
Commit: 32f601f9a4
Pull-request: https://github.com/SerenityOS/serenity/pull/23122
1 changed files with 1 additions and 1 deletions
|
@ -763,7 +763,7 @@ PDFErrorOr<Vector<DeprecatedFlyString>> CFF::parse_charset(Reader&& reader, size
|
|||
while (names.size() < glyph_count - 1) {
|
||||
// CFF spec, "Table 21 Range2 Format"
|
||||
auto first_sid = TRY(reader.try_read<BigEndian<SID>>());
|
||||
int left = TRY(reader.try_read<Card16>());
|
||||
int left = TRY(reader.try_read<BigEndian<Card16>>());
|
||||
for (SID sid = first_sid; left >= 0 && names.size() < glyph_count - 1; left--, sid++)
|
||||
TRY(names.try_append(resolve_sid(sid, strings)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue