diff --git a/qml/AboutPage.qml b/qml/AboutPage.qml
index 35b92cf..e44d455 100644
--- a/qml/AboutPage.qml
+++ b/qml/AboutPage.qml
@@ -55,6 +55,11 @@ Page {
color: Theme.mainTextColor
linkColor: color
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
onLinkActivated: Qt.openUrlExternally(link)
}
@@ -71,6 +76,11 @@ Page {
color: Theme.mainTextColor
linkColor: color
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
onLinkActivated: Qt.openUrlExternally(link)
}
@@ -82,6 +92,11 @@ Page {
color: Theme.mainTextColor
linkColor: color
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
onLinkActivated: Qt.openUrlExternally(link)
}
@@ -93,6 +108,11 @@ Page {
color: Theme.mainTextColor
linkColor: color
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
onLinkActivated: Qt.openUrlExternally(link)
}
@@ -109,6 +129,32 @@ Page {
color: Theme.mainTextColor
linkColor: color
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
+ onLinkActivated: Qt.openUrlExternally(link)
+ }
+
+ Item {
+ height: ScreenValues.dp * 8
+ width: 1
+ }
+
+ Label {
+ width: parent.width
+ horizontalAlignment: "AlignHCenter"
+ wrapMode: "Wrap"
+ text: qsTr("Muli font by Vernon Adams SIL Open Font License, 1.1")
+ color: Theme.mainTextColor
+ linkColor: color
+
+ font {
+ pixelSize: 16 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
onLinkActivated: Qt.openUrlExternally(link)
}
}
diff --git a/qml/FakeMainPage.qml b/qml/FakeMainPage.qml
index b27b4df..d54c3ab 100644
--- a/qml/FakeMainPage.qml
+++ b/qml/FakeMainPage.qml
@@ -124,7 +124,11 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true
- font.pixelSize: ScreenValues.dp * 18
+ font {
+ pixelSize: 18 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
color: Theme.mainTextColor
text: qsTr("This is your playlist. The music that you add will appear here. Also when you play music the media controls will appear at the bottom.")
renderType: Text.NativeRendering
@@ -209,7 +213,11 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true
- font.pixelSize: ScreenValues.dp * 18
+ font {
+ pixelSize: 18 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
+
color: Theme.mainTextColor
text: qsTr("This is your playlist. The music that you add will appear here. Also when you play music the media controls will appear at the bottom.")
renderType: Text.NativeRendering
diff --git a/qml/FakePlaybackControls.qml b/qml/FakePlaybackControls.qml
index 833f299..59318bf 100644
--- a/qml/FakePlaybackControls.qml
+++ b/qml/FakePlaybackControls.qml
@@ -60,7 +60,11 @@ Rectangle {
verticalAlignment: "AlignVCenter"
text: "02:10"
renderType: Text.NativeRendering
- font.pixelSize: 12 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
RowLayout {
@@ -104,7 +108,11 @@ Rectangle {
text: "04:14"
horizontalAlignment: "AlignRight"
renderType: Text.NativeRendering
- font.pixelSize: 12 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
}
}
@@ -120,7 +128,11 @@ Rectangle {
color: Style.TEXT_COLOR_DARK
renderType: Text.NativeRendering
- font.pixelSize: 14 * ScreenValues.dp
+
+ font {
+ pixelSize: 14 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
}
}
diff --git a/qml/FakeSearchPage.qml b/qml/FakeSearchPage.qml
index 514ba72..8ee496f 100644
--- a/qml/FakeSearchPage.qml
+++ b/qml/FakeSearchPage.qml
@@ -40,7 +40,10 @@ Page {
inputMethodHints: Qt.ImhNoPredictiveText
placeholderText: qsTr("Search songs and artists")
- font.pointSize: 14
+ font {
+ pointSize: 14
+ family: Theme.fontFamily
+ }
onAccepted: root.search()
diff --git a/qml/PlaybackControls.qml b/qml/PlaybackControls.qml
index ab151aa..daf52d6 100644
--- a/qml/PlaybackControls.qml
+++ b/qml/PlaybackControls.qml
@@ -108,7 +108,11 @@ Rectangle {
verticalAlignment: "AlignVCenter"
text: formatMilliseconds(audioElement.position)
renderType: Text.NativeRendering
- font.pixelSize: 12 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
RowLayout {
@@ -160,7 +164,11 @@ Rectangle {
text: formatMilliseconds(audioElement.duration)
horizontalAlignment: "AlignRight"
renderType: Text.NativeRendering
- font.pixelSize: 12 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
Item {
@@ -179,7 +187,11 @@ Rectangle {
Layout.preferredWidth: parent.width - (16 * ScreenValues.dp)
color: Style.TEXT_COLOR_DARK
renderType: Text.NativeRendering
- font.pixelSize: 14 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
}
}
}
diff --git a/qml/SearchPage.qml b/qml/SearchPage.qml
index 59076cd..d7a2dbf 100644
--- a/qml/SearchPage.qml
+++ b/qml/SearchPage.qml
@@ -43,7 +43,11 @@ Page {
inputMethodHints: Qt.ImhNoPredictiveText
placeholderText: qsTr("Search songs and artists")
- font.pixelSize: 14 * ScreenValues.dp
+
+ font {
+ pixelSize: 14 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
onAccepted: root.search()
@@ -277,8 +281,12 @@ Page {
property string name: ""
text: qsTr("Downloading") + "\n" + (name.length > 20 ? name.substring(0, 20) + "..." : name) + "\n" + Math.floor(progress * 100) + "%"
+ color: "white"
- font.pointSize: 22
+ font {
+ pixelSize: 22 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
diff --git a/qml/SongDelegate.qml b/qml/SongDelegate.qml
index d00fa87..4ad614b 100644
--- a/qml/SongDelegate.qml
+++ b/qml/SongDelegate.qml
@@ -66,7 +66,10 @@ Item {
Label {
id: songName
- font.pixelSize: 14 * ScreenValues.dp
+ font {
+ pixelSize: 14 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
Layout.fillWidth: true
color: Style.TEXT_COLOR_DARK
@@ -81,7 +84,11 @@ Item {
Label {
Layout.fillWidth: true
- font.pixelSize: 12 * ScreenValues.dp
+
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
elide: Text.ElideRight
color: Style.TEXT_SECONDARY_COLOR_DARK
@@ -104,7 +111,10 @@ Item {
anchors.centerIn: parent
- font.pixelSize: 12 * ScreenValues.dp
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
color: Style.TEXT_COLOR_LIGHT
elide: Text.ElideRight
@@ -117,7 +127,10 @@ Item {
Label {
Layout.fillWidth: true
- font.pixelSize: 12 * ScreenValues.dp
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
elide: Text.ElideRight
color: Style.TEXT_SECONDARY_COLOR_DARK
diff --git a/qml/TutorialPage.qml b/qml/TutorialPage.qml
index d58c1bc..cfc2030 100644
--- a/qml/TutorialPage.qml
+++ b/qml/TutorialPage.qml
@@ -116,7 +116,10 @@ Page {
width: 0.8 * (isScreenPortrait ? parent.width : parent.height)
color: "#808080"
- font.pixelSize: ScreenValues.dp * 24
+ font {
+ pixelSize: 24 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
text: "Welcome to Musicgear"
wrapMode: Text.Wrap
horizontalAlignment: "AlignHCenter"
@@ -195,7 +198,10 @@ Page {
width: 0.8 * (isScreenPortrait ? parent.width : parent.height)
color: "#808080"
- font.pixelSize: ScreenValues.dp * 12
+ font {
+ pixelSize: 12 * ScreenValues.dp
+ family: Theme.fontFamily
+ }
text: "Swipe up to begin"
wrapMode: Text.Wrap
horizontalAlignment: "AlignHCenter"
diff --git a/qml/main.qml b/qml/main.qml
index dc70009..be2f669 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -49,6 +49,19 @@ ApplicationWindow {
width: resolutions[currentResolution]["width"]
height: resolutions[currentResolution]["height"]
+ FontLoader { source: "qrc:/fonts/Muli-Italic" }
+ FontLoader { source: "qrc:/fonts/Muli-Light" }
+ FontLoader { source: "qrc:/fonts/Muli-Light" }
+ FontLoader {
+ id: font
+
+ source: "qrc:/fonts/Muli-Regular"
+ onStatusChanged: {
+ if (status === FontLoader.Ready)
+ Theme.fontFamily = font.name
+ }
+ }
+
Rectangle {
id: background
@@ -205,6 +218,9 @@ ApplicationWindow {
if (ApplicationInfo.timesLaunched > 15 && Math.floor((now.getTime() - ApplicationInfo.firstTimeLaunched.getTime()) / 86400000) >= 5 && Qt.platform.os === "android") {
/// TODO: ANDROID - Show dialog and ask to review
}
+
+ if (font.status === FontLoader.Ready)
+ Theme.fontFamily = font.name
updateChecker.checkForUpdateOnGooglePlay()
}
}
diff --git a/resources.qrc b/resources.qrc
index 7512ff2..0e391fc 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -129,4 +129,10 @@
resources/images/drawable-xxxhdpi/settings.png
resources/images/drawable-xxxhdpi/add_to_playlist.png
+
+ resources/images/fonts/Muli-Italic.ttf
+ resources/images/fonts/Muli-Light.ttf
+ resources/images/fonts/Muli-LightItalic.ttf
+ resources/images/fonts/Muli-Regular.ttf
+
diff --git a/resources/images/fonts/Muli-Italic.ttf b/resources/images/fonts/Muli-Italic.ttf
new file mode 100644
index 0000000..9d20573
Binary files /dev/null and b/resources/images/fonts/Muli-Italic.ttf differ
diff --git a/resources/images/fonts/Muli-Light.ttf b/resources/images/fonts/Muli-Light.ttf
new file mode 100644
index 0000000..8dfff09
Binary files /dev/null and b/resources/images/fonts/Muli-Light.ttf differ
diff --git a/resources/images/fonts/Muli-LightItalic.ttf b/resources/images/fonts/Muli-LightItalic.ttf
new file mode 100644
index 0000000..a75b8fd
Binary files /dev/null and b/resources/images/fonts/Muli-LightItalic.ttf differ
diff --git a/resources/images/fonts/Muli-Regular.ttf b/resources/images/fonts/Muli-Regular.ttf
new file mode 100644
index 0000000..cf324e4
Binary files /dev/null and b/resources/images/fonts/Muli-Regular.ttf differ
diff --git a/resources/images/fonts/OFL.txt b/resources/images/fonts/OFL.txt
new file mode 100644
index 0000000..8a81298
--- /dev/null
+++ b/resources/images/fonts/OFL.txt
@@ -0,0 +1,93 @@
+Copyright (c) 2011 by vernon adams (vern@newtypography.co.uk),
+with Reserved Font Name "Muli".
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.