mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
LibGUI: Skip non-font files in the FontDatabase constructor
This commit is contained in:
parent
8d54e4e012
commit
cebf6a7039
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ FontDatabase::FontDatabase()
|
||||||
}
|
}
|
||||||
while (di.has_next()) {
|
while (di.has_next()) {
|
||||||
String name = di.next_path();
|
String name = di.next_path();
|
||||||
|
if (!name.ends_with(".font"))
|
||||||
|
continue;
|
||||||
|
|
||||||
auto path = String::format("/res/fonts/%s", name.characters());
|
auto path = String::format("/res/fonts/%s", name.characters());
|
||||||
if (auto font = Gfx::Font::load_from_file(path)) {
|
if (auto font = Gfx::Font::load_from_file(path)) {
|
||||||
Metadata metadata;
|
Metadata metadata;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue