diff --git a/qgcresources.qrc b/qgcresources.qrc
index 5d2abeb..d6ae623 100644
--- a/qgcresources.qrc
+++ b/qgcresources.qrc
@@ -12,6 +12,8 @@
resources/fonts/OpenSans-Regular.ttf
resources/fonts/OpenSans-Semibold.ttf
+ resources/fonts/NanumGothic-Regular.ttf
+ resources/fonts/NanumGothic-Bold.ttf
src/AutoPilotPlugins/Common/Images/AirframeComponentIcon.png
diff --git a/resources/fonts/NanumGothic-Bold.ttf b/resources/fonts/NanumGothic-Bold.ttf
new file mode 100755
index 0000000..92006ef
Binary files /dev/null and b/resources/fonts/NanumGothic-Bold.ttf differ
diff --git a/resources/fonts/NanumGothic-Regular.ttf b/resources/fonts/NanumGothic-Regular.ttf
new file mode 100755
index 0000000..b8636c1
Binary files /dev/null and b/resources/fonts/NanumGothic-Regular.ttf differ
diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc
index cde048a..ad3068f 100644
--- a/src/QGCApplication.cc
+++ b/src/QGCApplication.cc
@@ -477,8 +477,15 @@ bool QGCApplication::_initForNormalAppBoot()
//-- See App.SettinsGroup.json for index
int langID = toolbox()->settingsManager()->appSettings()->language()->rawValue().toInt();
- //-- Don't load custom fonts if not using standard character set
- if(langID != 6 /*Korean*/ && langID != 9 /*Chinese*/) {
+ //-- Load font appropriate for the language
+ if(langID == 6 /*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";
+ }
+ } else {
if(QFontDatabase::addApplicationFont(":/fonts/opensans") < 0) {
qWarning() << "Could not load /fonts/opensans font";
}
diff --git a/src/QmlControls/QGCCheckBox.qml b/src/QmlControls/QGCCheckBox.qml
index af2dfa9..ae1877d 100644
--- a/src/QmlControls/QGCCheckBox.qml
+++ b/src/QmlControls/QGCCheckBox.qml
@@ -28,6 +28,7 @@ CheckBox {
text: control.text
font.pointSize: textFontPointSize
font.bold: control.textBold
+ font.family: ScreenTools.normalFontFamily
color: control.textColor
anchors.centerIn: parent
}
@@ -43,7 +44,7 @@ CheckBox {
border.width: 1
opacity: control.checkedState === Qt.PartiallyChecked ? 0.5 : 1
QGCColoredImage {
- source: "/qmlimages/checkbox-check.svg"
+ source: "/qmlimages/checkbox-check.svg"
color: "black"
opacity: control.checkedState === Qt.Checked ? (control.enabled ? 1 : 0.5) : 0
mipmap: true
diff --git a/src/QmlControls/QGCHoverButton.qml b/src/QmlControls/QGCHoverButton.qml
index b7afb31..f34bfa3 100644
--- a/src/QmlControls/QGCHoverButton.qml
+++ b/src/QmlControls/QGCHoverButton.qml
@@ -79,15 +79,14 @@ Button {
}
Text {
- id: innerText
-
- text: button.text
- color: _currentContentColor
- width: parent.width
-
- font.pointSize: ScreenTools.defaultFontPointSize
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
+ id: innerText
+ text: button.text
+ color: _currentContentColor
+ width: parent.width
+ font.family: ScreenTools.normalFontFamily
+ font.pointSize: ScreenTools.defaultFontPointSize
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
}
} // Column - content
} // Item - content
diff --git a/src/QmlControls/QGCLabel.qml b/src/QmlControls/QGCLabel.qml
index 2700e02..ec55e35 100644
--- a/src/QmlControls/QGCLabel.qml
+++ b/src/QmlControls/QGCLabel.qml
@@ -7,7 +7,6 @@ import QGroundControl.ScreenTools 1.0
Text {
QGCPalette { id: __qgcPal; colorGroupEnabled: enabled }
-
font.pointSize: ScreenTools.defaultFontPointSize
font.family: ScreenTools.normalFontFamily
color: __qgcPal.text
diff --git a/src/QmlControls/QGCRadioButton.qml b/src/QmlControls/QGCRadioButton.qml
index 83de5dc..5134be6 100644
--- a/src/QmlControls/QGCRadioButton.qml
+++ b/src/QmlControls/QGCRadioButton.qml
@@ -34,7 +34,8 @@ RadioButton {
}
contentItem: Text {
- text: control.text
+ text: control.text
+ font.family: ScreenTools.normalFontFamily
font.pointSize: textFontPointSize
font.bold: control.textBold
color: control.textColor
diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml
index 9cb00a0..03c525e 100644
--- a/src/QmlControls/ScreenTools.qml
+++ b/src/QmlControls/ScreenTools.qml
@@ -94,8 +94,8 @@ Item {
property real checkBoxIndicatorSize: Math.round(defaultFontPixelHeight * (isMobile ? 1.5 : 1.0))
property real radioButtonIndicatorSize: checkBoxIndicatorSize
- readonly property string normalFontFamily: "opensans"
- readonly property string demiboldFontFamily: "opensans-demibold"
+ readonly property string normalFontFamily: ScreenToolsController.normalFontFamily
+ readonly property string demiboldFontFamily: ScreenToolsController.boldFontFamily
readonly property string fixedFontFamily: ScreenToolsController.fixedFontFamily
/* This mostly works but for some reason, reflowWidths() in SetupView doesn't change size.
I've disabled (in release builds) until I figure out why. Changes require a restart for now.
diff --git a/src/QmlControls/ScreenToolsController.cc b/src/QmlControls/ScreenToolsController.cc
index 68a3190..6a219e1 100644
--- a/src/QmlControls/ScreenToolsController.cc
+++ b/src/QmlControls/ScreenToolsController.cc
@@ -15,6 +15,8 @@
#include
#include
+#include "SettingsManager.h"
+
#if defined(__ios__)
#include
#endif
@@ -41,3 +43,27 @@ ScreenToolsController::fixedFontFamily() const
{
return QFontDatabase::systemFont(QFontDatabase::FixedFont).family();
}
+
+QString
+ScreenToolsController::normalFontFamily() const
+{
+ //-- See App.SettinsGroup.json for index
+ int langID = qgcApp()->toolbox()->settingsManager()->appSettings()->language()->rawValue().toInt();
+ if(langID == 6 /*Korean*/) {
+ return QString("fonts/NanumGothic-Regular");
+ } else {
+ return QString("opensans");
+ }
+}
+
+QString
+ScreenToolsController::boldFontFamily() const
+{
+ //-- See App.SettinsGroup.json for index
+ int langID = qgcApp()->toolbox()->settingsManager()->appSettings()->language()->rawValue().toInt();
+ if(langID == 6 /*Korean*/) {
+ return QString("NanumGothic-Bold");
+ } else {
+ return QString("opensans-demibold");
+ }
+}
diff --git a/src/QmlControls/ScreenToolsController.h b/src/QmlControls/ScreenToolsController.h
index 979b04b..cb66587 100644
--- a/src/QmlControls/ScreenToolsController.h
+++ b/src/QmlControls/ScreenToolsController.h
@@ -39,6 +39,8 @@ public:
Q_PROPERTY(bool isSerialAvailable READ isSerialAvailable CONSTANT)
Q_PROPERTY(QString iOSDevice READ iOSDevice CONSTANT)
Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily CONSTANT)
+ Q_PROPERTY(QString normalFontFamily READ normalFontFamily CONSTANT)
+ Q_PROPERTY(QString boldFontFamily READ boldFontFamily CONSTANT)
// Returns current mouse position
Q_INVOKABLE int mouseX(void) { return QCursor::pos().x(); }
@@ -102,7 +104,8 @@ public:
QString iOSDevice () const;
QString fixedFontFamily () const;
-
+ QString normalFontFamily () const;
+ QString boldFontFamily () const;
};
#endif