mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibGfx/OpenType: Read the correct number of pairs from kern table
We were trying to read exactly 5 pairs for some reason, instead of the number specified by the format 0 header. Fixing this makes "OpenSans Condensed" load on my machine.
This commit is contained in:
parent
e7eaf3b566
commit
d26ad8450f
Notes:
sideshowbarker
2024-07-17 09:48:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d26ad8450f Pull-request: https://github.com/SerenityOS/serenity/pull/22629
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ ErrorOr<Kern> Kern::from_slice(ReadonlyBytes slice)
|
|||
auto subtable_format = (subtable_header.coverage & 0xFF00) >> 8;
|
||||
if (subtable_format == 0) {
|
||||
auto const& format0_header = *TRY(stream.read_in_place<Format0 const>());
|
||||
auto pairs = TRY(stream.read_in_place<Format0Pair const>(5));
|
||||
auto pairs = TRY(stream.read_in_place<Format0Pair const>(format0_header.n_pairs));
|
||||
|
||||
subtables.append(Subtable {
|
||||
.header = subtable_header,
|
||||
|
|
Loading…
Reference in a new issue