diff --git a/2048-qt.pro b/2048-qt.pro
index a0d2068..5c7ec04 100644
--- a/2048-qt.pro
+++ b/2048-qt.pro
@@ -30,3 +30,5 @@ HEADERS += \
settings.h
TRANSLATIONS = ts/2048-qt_zh_CN.ts
+
+VERSION = 0.1.0
diff --git a/bin/2048-qt-linux-x86_64 b/bin/2048-qt-linux-x86_64
index 2dd8a06..ebd74ad 100755
Binary files a/bin/2048-qt-linux-x86_64 and b/bin/2048-qt-linux-x86_64 differ
diff --git a/fonts/DroidSansFallback.ttf b/fonts/DroidSansFallback.ttf
new file mode 100755
index 0000000..cfbc66a
Binary files /dev/null and b/fonts/DroidSansFallback.ttf differ
diff --git a/qml/Tile.qml b/qml/Tile.qml
index 87d45e8..457a999 100644
--- a/qml/Tile.qml
+++ b/qml/Tile.qml
@@ -14,11 +14,13 @@ Rectangle {
property bool runNewTileAnim: false
property bool destroyFlag: false
+ FontLoader { id: localFont; source: "qrc:///fonts/DroidSansFallback.ttf" }
+
Text {
id: tileLabel
text: tileText
color: tileColor
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: tileFontSize
font.bold: true
anchors.centerIn: parent
diff --git a/qml/main.qml b/qml/main.qml
index a9741e8..bbddac4 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -126,9 +126,11 @@ ApplicationWindow {
onClicked: parent.forceActiveFocus()
}
+ FontLoader { id: localFont; source: "qrc:///fonts/DroidSansFallback.ttf" }
+
Text {
id: gameName
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 55
font.bold: true
text: "2048"
@@ -151,7 +153,7 @@ ApplicationWindow {
text: (index == 0) ? qsTr("SCORE") : qsTr("BEST")
anchors.horizontalCenter: parent.horizontalCenter
y: 7
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 13
color: helper.myColors.fglight
}
@@ -159,7 +161,7 @@ ApplicationWindow {
text: scoreText
anchors.horizontalCenter: parent.horizontalCenter
y: 25
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 25
font.bold: true
color: "white"
@@ -169,7 +171,7 @@ ApplicationWindow {
Text {
id: addScoreText
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 25
font.bold: true
color: Qt.rgba(119/255, 110/255, 101/255, 0.9);
@@ -210,7 +212,7 @@ ApplicationWindow {
height: 40
text: qsTr("Join the numbers and get to the 2048 tile!")
color: helper.myColors.fgdark
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 16
verticalAlignment: Text.AlignVCenter
}
@@ -229,7 +231,7 @@ ApplicationWindow {
anchors.centerIn: parent
text: qsTr("New Game")
color: helper.myColors.fgbutton
- font.family: "Sans-serif"
+ font.family: localFont.name
font.pixelSize: 18
font.bold: true
}
diff --git a/resources.qrc b/resources.qrc
index 1873523..d064a1c 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -4,5 +4,6 @@
qml/main.qml
qml/2048.js
qml/Tile.qml
+ fonts/DroidSansFallback.ttf