LibWeb: Store FontCascadeList instead of Font in CanvasState

This is required to implement per-glyph font fallbacks in the upcoming
changes.
This commit is contained in:
Aliaksandr Kalenik 2025-04-19 18:34:53 +02:00 committed by Andreas Kling
parent 455700d379
commit 2c64c6d773
Notes: github-actions[bot] 2025-04-21 07:52:30 +00:00
4 changed files with 22 additions and 20 deletions

View file

@ -65,7 +65,7 @@ public:
auto& font_size = *font_style_value.longhand(CSS::PropertyID::FontSize);
auto& font_family = *font_style_value.longhand(CSS::PropertyID::FontFamily);
auto font_list = canvas_element.document().style_computer().compute_font_for_style_values(&canvas_element, {}, font_family, font_size, font_style, font_weight, font_width);
my_drawing_state().current_font = font_list->first();
my_drawing_state().current_font_cascade_list = font_list;
}
Bindings::CanvasTextAlign text_align() const { return my_drawing_state().text_align; }