Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/qt/dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ bool BitcoinCore::baseInitialize()
{
return false;
}
if (!GUIUtil::loadFonts()) {
return false;
}
return true;
}

Expand Down Expand Up @@ -693,7 +690,12 @@ int main(int argc, char *argv[])
app.parameterSetup();
// Load GUI settings from QSettings
app.createOptionsModel(gArgs.GetBoolArg("-resetguisettings", false));

// Load custom application fonts and setup font management
if (!GUIUtil::loadFonts()) {
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
QObject::tr("Error: Failed to load application fonts."));
return EXIT_FAILURE;
}
// Validate/set font family
if (gArgs.IsArgSet("-font-family")) {
GUIUtil::FontFamily family;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ bool loadFonts()

// Fail if an added id is -1 which means QFontDatabase::addApplicationFont failed.
if (std::find(vecFontIds.begin(), vecFontIds.end(), -1) != vecFontIds.end()) {
return InitError("Font loading failed.");
return false;
}

// Print debug logs for added fonts fetched by the added ids
Expand Down