Skip to content

Commit

Permalink
Only bundle Droid fallback font on Embedded edition
Browse files Browse the repository at this point in the history
Normal Linux/Windows/Mac should have support for Asian fonts
themselves.
  • Loading branch information
maxnet committed Mar 24, 2022
1 parent 6861a2a commit 93811df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ int main(int argc, char *argv[])
/* Set default font */
QStringList fontList = QFontDatabase::applicationFontFamilies(QFontDatabase::addApplicationFont(":/fonts/Roboto-Regular.ttf"));
QGuiApplication::setFont(QFont(fontList.first(), 10));
QFontDatabase::addApplicationFont(":/fonts/DroidSansFallback.ttf");
if (QFile::exists("/usr/share/fonts/truetype/droid/DroidSansFallback.ttf"))
QFontDatabase::addApplicationFont("/usr/share/fonts/truetype/droid/DroidSansFallback.ttf");

QLocale::Language l = QLocale::system().language();
if (l == QLocale::AnyLanguage || l == QLocale::C)
Expand Down
1 change: 0 additions & 1 deletion src/qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
<file>qmlcomponents/ImButton.qml</file>
<file>qmlcomponents/ImCheckBox.qml</file>
<file>qmlcomponents/ImRadioButton.qml</file>
<file>fonts/DroidSansFallback.ttf</file>
</qresource>
</RCC>

0 comments on commit 93811df

Please sign in to comment.