LibWeb: Add basic variable font support

Integrates the new `FontVariationSettings` from LibGfx into LibWeb to
enable initial variable font functionality. Currently, only the `wght`
(weight) axis is fully supported and tested. This update also introduces
support for the CSS `font-variation-settings` property.
This commit is contained in:
norbiros 2025-10-14 16:21:00 +02:00 committed by Alexander Kalenik
parent 489381698f
commit 3829a85fde
Notes: github-actions[bot] 2025-11-04 20:46:29 +00:00
7 changed files with 94 additions and 24 deletions

View file

@ -146,7 +146,9 @@ void CanvasTextDrawingStyles<IncludingClass, CanvasType>::set_font(StringView fo
computed_font_size->as_length().length().absolute_length_to_px(),
computed_font_style->as_font_style().to_font_slope(),
computed_font_weight->as_number().number(),
computed_font_width->as_percentage().percentage());
computed_font_width->as_percentage().percentage(),
{},
length_resolution_context);
},
[](HTML::WorkerGlobalScope*) -> RefPtr<Gfx::FontCascadeList const> {
// FIXME: implement computing the font for HTML::WorkerGlobalScope