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:
parent
3620a6e054
commit
0c66e53544
Notes:
sideshowbarker
2024-07-18 22:33:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/0c66e53544f
1 changed files with 1 additions and 6 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Reference in a new issue