mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 13:02:28 +00:00
LibGfx/OpenType: Do not preemptively return while searching for kerning
The kerning value for a particular glyph may not be in the first table. Continue until we either run out of tables or we find an applicable value.
This commit is contained in:
parent
b6cfacfd9f
commit
b5f0f94757
Notes:
sideshowbarker
2024-07-17 06:39:26 +09:00
Author: https://github.com/LukasACH
Commit: b5f0f94757
Pull-request: https://github.com/SerenityOS/serenity/pull/17959
1 changed files with 2 additions and 2 deletions
|
@ -1122,7 +1122,7 @@ Optional<i16> GPOS::glyph_kerning(u16 left_glyph_id, u16 right_glyph_id) const
|
|||
|
||||
if (!coverage_index.has_value()) {
|
||||
dbgln_if(OPENTYPE_GPOS_DEBUG, "Glyph ID not covered by table");
|
||||
return {};
|
||||
continue;
|
||||
}
|
||||
|
||||
size_t value1_size = popcount(static_cast<u32>(pair_pos_format1.value_format1 & 0xff)) * sizeof(u16);
|
||||
|
@ -1202,7 +1202,7 @@ Optional<i16> GPOS::glyph_kerning(u16 left_glyph_id, u16 right_glyph_id) const
|
|||
|
||||
if (!left_class.has_value() || !right_class.has_value()) {
|
||||
dbgln_if(OPENTYPE_GPOS_DEBUG, "Need glyph class for both sides");
|
||||
return {};
|
||||
continue;
|
||||
}
|
||||
|
||||
dbgln_if(OPENTYPE_GPOS_DEBUG, "Classes: {}, {}", left_class.value(), right_class.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue