summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-07 10:55:25 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-07 10:57:07 +0100
commit0c66e53544f933500477ddad05bc5a7f15bea951 (patch)
treecc78ae5b850423b0499e7ad5c8d8e78f86d9389e
parent3620a6e054494223f9d5be322cf9cb23c3b465af (diff)
downloadserenity-0c66e53544f933500477ddad05bc5a7f15bea951.zip
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.
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 4a3c1809e8..1d0301cfae 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -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 };