diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/AltitudeScale.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/AltitudeScale.qml index 52d6fd09c..35a57dba8 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/AltitudeScale.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/AltitudeScale.qml @@ -45,7 +45,7 @@ Item { text: altitude_scale.topNumber - index color: "white" font.pixelSize: parent.height / 3 - font.family: "Arial" + font.family: pt_bold.name anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.top @@ -100,7 +100,7 @@ Item { text: " " +altitude.toFixed(1) color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 0.35 weight: Font.DemiBold } @@ -125,7 +125,7 @@ Item { text: qmlWidget.altitudeUnit color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 0.6 weight: Font.DemiBold } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Compass.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Compass.qml index 2fb92cc19..2340c74f5 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Compass.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Compass.qml @@ -88,7 +88,7 @@ Item { text: Math.floor(AttitudeState.Yaw).toFixed() color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 1.2 } anchors.centerIn: parent diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml index 96897fc38..712fb3656 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Info.qml @@ -105,7 +105,7 @@ Item { text: ["NO GPS", "NO FIX", "FIX 2D", "FIX 3D"][GPSPositionSensor.Status] anchors.centerIn: parent font.pixelSize: Math.floor(parent.height*1.3) - font.family: "Arial" + font.family: pt_bold.name font.weight: Font.DemiBold color: "white" } @@ -138,7 +138,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -159,7 +159,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -182,7 +182,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -208,7 +208,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -229,7 +229,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -251,7 +251,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.5) weight: Font.DemiBold } @@ -307,7 +307,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) weight: Font.DemiBold } @@ -334,7 +334,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) weight: Font.DemiBold } @@ -368,7 +368,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) weight: Font.DemiBold } @@ -405,7 +405,7 @@ Item { color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1) weight: Font.DemiBold } @@ -471,7 +471,7 @@ Item { anchors.centerIn: parent color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 1.2 } } @@ -502,7 +502,7 @@ Item { anchors.centerIn: parent color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 1.2 } } @@ -533,7 +533,7 @@ Item { anchors.centerIn: parent color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 1.2 } } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml index 537c4bbb4..0b9e6b4e9 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Panels.qml @@ -404,7 +404,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) } } @@ -445,7 +445,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) } } @@ -490,7 +490,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) } } @@ -536,7 +536,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.6) } } @@ -809,7 +809,7 @@ Item { anchors.centerIn: parent color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold capitalization: Font.AllUppercase @@ -895,7 +895,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } @@ -928,7 +928,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } @@ -959,7 +959,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } @@ -990,7 +990,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.2) weight: Font.DemiBold } @@ -1021,7 +1021,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } @@ -1052,7 +1052,7 @@ Item { anchors.right: parent.right color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 1.4) weight: Font.DemiBold } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Pfd.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Pfd.qml index e14e4a96b..468a0de2e 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Pfd.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Pfd.qml @@ -24,6 +24,16 @@ Rectangle { Item { id: sceneItem + FontLoader { + id: pt_bold_narrow + source: "qrc:/pfdqml/fonts/PTN77F.ttf" + } + + FontLoader { + id: pt_bold + source: "qrc:/pfdqml/fonts/PTS75F.ttf" + } + width: Math.floor((parent.paintedHeight * 1.32) - (parent.paintedHeight * 0.013)) height: Math.floor(parent.paintedHeight - parent.paintedHeight * 0.02) property variant viewportSize : Qt.size(width, height) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/PfdIndicators.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/PfdIndicators.qml index a254f231e..47f147e0e 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/PfdIndicators.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/PfdIndicators.qml @@ -22,7 +22,7 @@ Item { id: telemetry_rate text: GCSTelemetryStats.TxDataRate.toFixed()+"/"+GCSTelemetryStats.RxDataRate.toFixed() color: "white" - font.family: "Arial" + font.family: pt_bold.name font.pixelSize: telemetry_status.height * 0.75 anchors.top: telemetry_status.bottom @@ -33,7 +33,7 @@ Item { id: gps_text text: "GPS: " + GPSPositionSensor.Satellites + "\nPDP: " + Math.round(GPSPositionSensor.PDOP*10)/10 color: "white" - font.family: "Arial" + font.family: pt_bold.name font.pixelSize: telemetry_status.height * 0.75 visible: GPSPositionSensor.Satellites > 0 @@ -52,7 +52,7 @@ Item { color: "white" - font.family: "Arial" + font.family: pt_bold.name //I think it should be pixel size, //but making it more consistent with C++ version instead diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/SpeedScale.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/SpeedScale.qml index d86332410..a8b8153df 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/SpeedScale.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/SpeedScale.qml @@ -49,7 +49,7 @@ Item { visible: speed_scale.topNumber - index >= 0 font.pixelSize: parent.height / 3 - font.family: "Arial" + font.family: pt_bold.name anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.top @@ -90,7 +90,7 @@ Item { text: sceneItem.groundSpeed.toFixed(1)+" " color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 0.35 weight: Font.DemiBold } @@ -115,7 +115,7 @@ Item { text: qmlWidget.speedUnit color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 0.6 weight: Font.DemiBold } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml index 166f3bb22..0a177032d 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/VsiScale.qml @@ -86,7 +86,7 @@ Item { text: qmlWidget.altitudeUnit == "m" ? "m/s" : "ft/s" color: "cyan" font { - family: "Arial" + family: pt_bold.name pixelSize: parent.height * 1.7 weight: Font.DemiBold } diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml index 8553eee6b..d0f985fe8 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 Item { id: warnings + property variant sceneSize // Uninitialised, OK, Warning, Error, Critical property variant statusColors : ["gray", "green", "red", "red", "red"] @@ -70,7 +71,7 @@ Item { anchors.centerIn: parent text: formatTime(time_h) + ":" + formatTime(time_m) + ":" + formatTime(time_s) font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.8) weight: Font.DemiBold } @@ -95,7 +96,7 @@ Item { anchors.centerIn: parent text: ["DISARMED","ARMING","ARMED"][FlightStatus.Armed] font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) weight: Font.DemiBold } @@ -120,7 +121,7 @@ Item { anchors.centerIn: parent text: "RC INPUT" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) weight: Font.DemiBold } @@ -152,7 +153,7 @@ Item { text: "MASTER CAUTION" color: "white" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) weight: Font.DemiBold } @@ -177,7 +178,7 @@ Item { anchors.centerIn: parent text: "AUTOPILOT" font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) weight: Font.DemiBold } @@ -203,9 +204,9 @@ Item { text: ["MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "POS HOLD", "COURSELOCK", "POS ROAM", "HOME LEASH", "ABS POS", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE"][FlightStatus.FlightMode] font { - family: "Arial" - pixelSize: Math.floor(parent.height * 0.74) - weight: Font.DemiBold + family: pt_bold_narrow.name + pixelSize: Math.floor(parent.height * 0.8) + weight: Font.Bold } } } @@ -232,7 +233,7 @@ Item { text: ["MANUAL"," "," ", " ", " ", " ", " ", " ", "ALT HOLD", "ALT VARIO", "CRUISECTRL", "AUTO"][thrust_mode.toString()] font { - family: "Arial" + family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) weight: Font.DemiBold } diff --git a/ground/openpilotgcs/src/plugins/pfdqml/PfdResources.qrc b/ground/openpilotgcs/src/plugins/pfdqml/PfdResources.qrc new file mode 100644 index 000000000..28ed3eae5 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/pfdqml/PfdResources.qrc @@ -0,0 +1,6 @@ + + + fonts/PTN77F.ttf + fonts/PTS75F.ttf + + diff --git a/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTN77F.ttf b/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTN77F.ttf new file mode 100644 index 000000000..fab582b34 Binary files /dev/null and b/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTN77F.ttf differ diff --git a/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTS75F.ttf b/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTS75F.ttf new file mode 100644 index 000000000..dbf45b59a Binary files /dev/null and b/ground/openpilotgcs/src/plugins/pfdqml/fonts/PTS75F.ttf differ diff --git a/ground/openpilotgcs/src/plugins/pfdqml/fonts/Paratype PT Sans Free Font License.txt b/ground/openpilotgcs/src/plugins/pfdqml/fonts/Paratype PT Sans Free Font License.txt new file mode 100644 index 000000000..20330f6d1 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/pfdqml/fonts/Paratype PT Sans Free Font License.txt @@ -0,0 +1,26 @@ +Copyright © 2009 ParaType Ltd. +with Reserved Names "PT Sans" and "ParaType". + +FONT LICENSE + +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 Name(s) or combinations of Reserved Names with other words unless explicit written permission is granted by the ParaType. This restriction only applies to the primary font name as presented to the users. + +4) The name of ParaType 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 ParaType and the author(s) or with explicit written permission of ParaType. + +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 & TERRITORY +This license has no limits on time and territory, but it 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 PARATYPE 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. + +ParaType Ltd +http://www.paratype.ru \ No newline at end of file diff --git a/ground/openpilotgcs/src/plugins/pfdqml/pfdqml.pro b/ground/openpilotgcs/src/plugins/pfdqml/pfdqml.pro index 0d7da9e26..5c532a3c9 100644 --- a/ground/openpilotgcs/src/plugins/pfdqml/pfdqml.pro +++ b/ground/openpilotgcs/src/plugins/pfdqml/pfdqml.pro @@ -40,3 +40,6 @@ OTHER_FILES += PfdQml.pluginspec FORMS += pfdqmlgadgetoptionspage.ui +RESOURCES += \ + PfdResources.qrc +