Browse Source

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

Andreas Kling 5 years ago
parent
commit
9ac7b6fad1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Libraries/LibHTML/CSS/StyleProperties.cpp

+ 4 - 2
Libraries/LibHTML/CSS/StyleProperties.cpp

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