Unverified Commit 4d55d0c5 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #7463 from mavlink/koreanFonts

Load Korean fonts when needed
parents d5044690 9a551c85
......@@ -391,12 +391,6 @@ void QGCApplication::setLanguage()
break;
case 12:
locale = QLocale(QLocale::Korean);
if(QFontDatabase::addApplicationFont(":/fonts/NanumGothic-Regular") < 0) {
qWarning() << "Could not load /fonts/NanumGothic-Regular font";
}
if(QFontDatabase::addApplicationFont(":/fonts/NanumGothic-Bold") < 0) {
qWarning() << "Could not load /fonts/NanumGothic-Bold font";
}
break;
case 13:
locale = QLocale(QLocale::Norwegian);
......@@ -421,6 +415,16 @@ void QGCApplication::setLanguage()
break;
}
}
//-- We have specific fonts for Korean
if(locale == QLocale::Korean) {
qDebug() << "Loading Korean fonts" << locale.name();
if(QFontDatabase::addApplicationFont(":/fonts/NanumGothic-Regular") < 0) {
qWarning() << "Could not load /fonts/NanumGothic-Regular font";
}
if(QFontDatabase::addApplicationFont(":/fonts/NanumGothic-Bold") < 0) {
qWarning() << "Could not load /fonts/NanumGothic-Bold font";
}
}
qDebug() << "Loading localization for" << locale.name();
_app->removeTranslator(&_QGCTranslator);
_app->removeTranslator(&_QGCTranslatorQt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment