Wondering how one changes the font in Bitcoin/Litecoin/Altcoin and set it to be used globally?
Add the font as a resource and your QRC file should look somthing like:
and then add this to the main() function in bitcoin.cpp:
list << "DejaVuSerif.ttf" << "DejaVuSerif-Bold.ttf" << "DejaVuSerif-Italic.ttf" << "DejaVuSerif-BoldItalic.ttf";
int fontID(-1);
bool fontWarningShown(false);
for (QStringList::const_iterator constIterator = list.constBegin(); constIterator != list.constEnd(); ++constIterator) {
QFile res(":/polices/" + *constIterator);
if (res.open(QIODevice::ReadOnly) == false) {
if (fontWarningShown == false) {
QMessageBox::warning(0, "Application", (QString)"Impossible d'ouvrir la police " + QChar(0x00AB) + " DejaVu Serif " + QChar(0x00BB) + ".");
fontWarningShown = true;
}
} else {
fontID = QFontDatabase::addApplicationFontFromData(res.readAll());
if (fontID == -1 && fontWarningShown == false) {
QMessageBox::warning(0, "Application", (QString)"Impossible d'ouvrir la police " + QChar(0x00AB) + " DejaVu Serif " + QChar(0x00BB) + ".");
fontWarningShown = true;
}
}
}
Then after that, do :
You're welcome.