LibWeb: Honor font sizes specified by CSS

Instead of trying to coerce them into some font size we think we might
have, let's just honor the request and do our best to find a font.
This commit is contained in:
Andreas Kling 2021-02-07 10:55:25 +01:00
parent 3620a6e054
commit 0c66e53544
Notes: sideshowbarker 2024-07-18 22:33:20 +09:00

View file

@ -179,12 +179,7 @@ void StyleProperties::load_font() const
} else if (font_size->is_length()) {
// FIXME: This isn't really a length, it's a numeric value..
int font_size_integer = font_size->to_length().raw_value();
if (font_size_integer <= 10)
size = 10;
else if (font_size_integer <= 12)
size = 12;
else
size = 14;
size = font_size_integer;
}
FontSelector font_selector { family, size, weight };