mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
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:
parent
80ea865b19
commit
9b6da84fff
Notes:
github-actions[bot]
2025-06-23 12:28:02 +00:00
Author: https://github.com/tcl3
Commit: 9b6da84fff
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5168
Reviewed-by: https://github.com/AtkinsSJ ✅
17 changed files with 108 additions and 20 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue