mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
LibWeb: Disable font kerning if text-rendering is set to optimizeSpeed
If `font-kerning` is set to `normal` and `text-rendering` is set to `optimizeSpeed` then kerning is now disabled.
This commit is contained in:
parent
68035a2b8d
commit
b4097623e5
Notes:
github-actions[bot]
2025-06-27 15:53:02 +00:00
Author: https://github.com/tcl3
Commit: b4097623e5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5236
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 1 deletions
|
@ -425,7 +425,9 @@ 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.
|
||||
// AD-HOC: Disable kerning if font-kerning is set to normal and text rendering is set to optimize speed.
|
||||
features.set("kern"sv, computed_values.text_rendering() != CSS::TextRendering::Optimizespeed ? 1 : 0);
|
||||
break;
|
||||
case CSS::FontKerning::Normal:
|
||||
features.set("kern"sv, 1);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue