LibHTML: Don't assert when encountering an unknown font-weight

This commit is contained in:
Andreas Kling 2019-10-17 23:54:00 +02:00
commit 9ac7b6fad1
Notes: sideshowbarker 2024-07-19 11:39:24 +09:00

View file

@ -51,8 +51,10 @@ void StyleProperties::load_font() const
weight = ""; weight = "";
else if (font_weight == "bold") else if (font_weight == "bold")
weight = "Bold"; weight = "Bold";
else else {
ASSERT_NOT_REACHED(); dbg() << "Unknown font-weight: " << font_weight;
weight = "";
}
auto look_for_file = [](const StringView& expected_name) -> String { auto look_for_file = [](const StringView& expected_name) -> String {
// TODO: handle font sizes properly? // TODO: handle font sizes properly?