mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibHTML: Fall back to the system default font if we can't find a font
Instead of crashing when we don't have some font the CSS wanted, just go with Font::default_font().
This commit is contained in:
parent
769f86ff9c
commit
b587eb2f4d
Notes:
sideshowbarker
2024-07-19 11:46:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b587eb2f4d3
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,8 @@ void StyleProperties::load_font() const
|
|||
|
||||
if (file_name.is_null()) {
|
||||
dbg() << "Failed to find a font for family " << font_family << " weight " << font_weight;
|
||||
ASSERT_NOT_REACHED();
|
||||
m_font = Font::default_font();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HTML_DEBUG
|
||||
|
|
Loading…
Add table
Reference in a new issue