mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibGUI: Skip non-font files in the FontDatabase constructor
This commit is contained in:
parent
8d54e4e012
commit
cebf6a7039
Notes:
sideshowbarker
2024-07-19 08:46:19 +09:00
Author: https://github.com/xTibor Commit: https://github.com/SerenityOS/serenity/commit/cebf6a7039e Pull-request: https://github.com/SerenityOS/serenity/pull/1417
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue