LibWeb/CSS: Implement the font-kerning property

This sets whether the kerning information stored on the current font is
used.
This commit is contained in:
Tim Ledbetter 2025-06-22 18:59:42 +01:00 committed by Sam Atkins
commit 9b6da84fff
Notes: github-actions[bot] 2025-06-23 12:28:02 +00:00
17 changed files with 108 additions and 20 deletions

View file

@ -417,6 +417,20 @@ HashMap<StringView, u8> InlineLevelIterator::shape_features_map() const
}
}
// FIXME: vkrn should be enabled for vertical text.
switch (computed_values.font_kerning()) {
case CSS::FontKerning::Auto:
// FIXME: Use a heuristic to determine whether to enable kerning.
case CSS::FontKerning::Normal:
features.set("kern"sv, 1);
break;
case CSS::FontKerning::None:
features.set("kern"sv, 0);
break;
default:
break;
}
return features;
}