From 51ecfdf71f44caf1f64fe972a7046a945d490e5b Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Wed, 13 Dec 2023 18:41:37 +0100 Subject: [PATCH] LibWeb: Add unscaled fallback font in case Font::with_size() failed --- Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 7e25afea85..a31651bdde 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -1894,6 +1894,8 @@ RefPtr StyleComputer::compute_font_for_style_values( auto found_font = StyleProperties::font_fallback(monospace, bold); if (auto scaled_fallback_font = found_font->with_size(font_size_in_pt)) { font_list->add(*scaled_fallback_font); + } else { + font_list->add(*found_font); } return font_list;