mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +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
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…
Add table
Add a link
Reference in a new issue