mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:17:34 +00:00
LibWeb: Don't try to parse GPOS lookup types we don't understand yet
At the moment, we only understand lookup type 2 (pair adjustment) so let's ignore lookup tables with other types. This fixes an issue where we'd choke on Noto Sans versions that come with a chained context positioning lookup table (type 8). Fixes #17924
This commit is contained in:
parent
a7a1df42c7
commit
3195c1832a
1 changed files with 6 additions and 0 deletions
|
@ -1041,6 +1041,12 @@ Optional<i16> GPOS::glyph_kerning(u16 left_glyph_id, u16 right_glyph_id) const
|
|||
dbgln_if(OPENTYPE_GPOS_DEBUG, " lookupFlag: {}", lookup.lookup_flag);
|
||||
dbgln_if(OPENTYPE_GPOS_DEBUG, " subtableCount: {}", lookup.subtable_count);
|
||||
|
||||
// NOTE: We only support lookup type 2 (Pair adjustment) at the moment.
|
||||
if (lookup.lookup_type != 2) {
|
||||
dbgln_if(OPENTYPE_GPOS_DEBUG, "FIXME: Implement GPOS lookup type {}", lookup.lookup_type);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (size_t j = 0; j < lookup.subtable_count; ++j) {
|
||||
auto pair_pos_format_offset = lookup.subtable_offsets[j];
|
||||
auto pair_pos_format_slice = lookup_slice.slice(pair_pos_format_offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue