mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibGUI: Skip non-font files in the FontDatabase constructor
This commit is contained in:
committed by
Andreas Kling
parent
8d54e4e012
commit
cebf6a7039
@@ -52,6 +52,9 @@ FontDatabase::FontDatabase()
|
||||
}
|
||||
while (di.has_next()) {
|
||||
String name = di.next_path();
|
||||
if (!name.ends_with(".font"))
|
||||
continue;
|
||||
|
||||
auto path = String::format("/res/fonts/%s", name.characters());
|
||||
if (auto font = Gfx::Font::load_from_file(path)) {
|
||||
Metadata metadata;
|
||||
|
||||
Reference in New Issue
Block a user