Load fonts located in base/fonts (#475)

This will register any font (OTF/TTF) located in the base/fonts folder
recursively. They can be used for any purpose, without needing to
install them on the system.
This commit is contained in:
oldmud0 2021-02-22 14:22:46 -06:00 committed by GitHub
parent 005ecca9d7
commit f1eb91a612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,12 @@ int main(int argc, char *argv[])
AOApplication::addLibraryPath(AOApplication::applicationDirPath() + "/lib");
QFontDatabase fontDatabase;
QDirIterator it(main_app.get_base_path() + "fonts",
QDirIterator::Subdirectories);
while (it.hasNext())
fontDatabase.addApplicationFont(it.next());
QSettings *configini = main_app.configini;
QPluginLoader apngPlugin("qapng");