embeded Droid Sans Fallback font
This commit is contained in:
parent
03b67b0bf1
commit
9bbf092a2f
@ -30,3 +30,5 @@ HEADERS += \
|
|||||||
settings.h
|
settings.h
|
||||||
|
|
||||||
TRANSLATIONS = ts/2048-qt_zh_CN.ts
|
TRANSLATIONS = ts/2048-qt_zh_CN.ts
|
||||||
|
|
||||||
|
VERSION = 0.1.0
|
||||||
|
Binary file not shown.
BIN
fonts/DroidSansFallback.ttf
Executable file
BIN
fonts/DroidSansFallback.ttf
Executable file
Binary file not shown.
@ -14,11 +14,13 @@ Rectangle {
|
|||||||
property bool runNewTileAnim: false
|
property bool runNewTileAnim: false
|
||||||
property bool destroyFlag: false
|
property bool destroyFlag: false
|
||||||
|
|
||||||
|
FontLoader { id: localFont; source: "qrc:///fonts/DroidSansFallback.ttf" }
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: tileLabel
|
id: tileLabel
|
||||||
text: tileText
|
text: tileText
|
||||||
color: tileColor
|
color: tileColor
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: tileFontSize
|
font.pixelSize: tileFontSize
|
||||||
font.bold: true
|
font.bold: true
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
14
qml/main.qml
14
qml/main.qml
@ -126,9 +126,11 @@ ApplicationWindow {
|
|||||||
onClicked: parent.forceActiveFocus()
|
onClicked: parent.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FontLoader { id: localFont; source: "qrc:///fonts/DroidSansFallback.ttf" }
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: gameName
|
id: gameName
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 55
|
font.pixelSize: 55
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: "2048"
|
text: "2048"
|
||||||
@ -151,7 +153,7 @@ ApplicationWindow {
|
|||||||
text: (index == 0) ? qsTr("SCORE") : qsTr("BEST")
|
text: (index == 0) ? qsTr("SCORE") : qsTr("BEST")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 7
|
y: 7
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
color: helper.myColors.fglight
|
color: helper.myColors.fglight
|
||||||
}
|
}
|
||||||
@ -159,7 +161,7 @@ ApplicationWindow {
|
|||||||
text: scoreText
|
text: scoreText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
y: 25
|
y: 25
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 25
|
font.pixelSize: 25
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: "white"
|
color: "white"
|
||||||
@ -169,7 +171,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: addScoreText
|
id: addScoreText
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 25
|
font.pixelSize: 25
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: Qt.rgba(119/255, 110/255, 101/255, 0.9);
|
color: Qt.rgba(119/255, 110/255, 101/255, 0.9);
|
||||||
@ -210,7 +212,7 @@ ApplicationWindow {
|
|||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Join the numbers and get to the <b>2048 tile</b>!")
|
text: qsTr("Join the numbers and get to the <b>2048 tile</b>!")
|
||||||
color: helper.myColors.fgdark
|
color: helper.myColors.fgdark
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
@ -229,7 +231,7 @@ ApplicationWindow {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: qsTr("New Game")
|
text: qsTr("New Game")
|
||||||
color: helper.myColors.fgbutton
|
color: helper.myColors.fgbutton
|
||||||
font.family: "Sans-serif"
|
font.family: localFont.name
|
||||||
font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
font.bold: true
|
font.bold: true
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
<file>qml/main.qml</file>
|
<file>qml/main.qml</file>
|
||||||
<file>qml/2048.js</file>
|
<file>qml/2048.js</file>
|
||||||
<file>qml/Tile.qml</file>
|
<file>qml/Tile.qml</file>
|
||||||
|
<file>fonts/DroidSansFallback.ttf</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user