summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-03-24 10:07:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-25 08:05:21 +0100
commit63de1350c2a926a9941ee1b72a73c84b08cb0fdb (patch)
tree71ab93c70e809fceb7aa740be3e44489325e93f8 /mkspecs/features
parent6cf7c3212fd8ed55b2bf18d6b87d1ef2bd543431 (diff)
winphone: deploy default font files as DirectWrite is not supported
For Visual Studio we can add the fonts we want to deploy to the project file by using the DEPLOYMENT variable. Change-Id: Ifc87a12a2bb4ec4ff1c0a8dc8f0b1fbf37e4e513 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/winrt/font_deployment.prf60
1 files changed, 60 insertions, 0 deletions
diff --git a/mkspecs/features/winrt/font_deployment.prf b/mkspecs/features/winrt/font_deployment.prf
new file mode 100644
index 0000000000..36db5b7cac
--- /dev/null
+++ b/mkspecs/features/winrt/font_deployment.prf
@@ -0,0 +1,60 @@
+# Provide default fonts for windows phone
+# The DEFAULTFONTS variable indicates, whether the default set of fonts is
+# used for deployment. The check below won't work after the fonts are added
+# so this helper variable is added and used for the user warning check later.
+!defined(FONTS, var):winphone {
+ FONTS = \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSans.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSans-Bold.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSans-BoldOblique.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSansMono.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSansMono-Bold.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSansMono-BoldOblique.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSansMono-Oblique.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSans-Oblique.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSerif.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSerif-Bold.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSerif-BoldOblique.ttf \
+ $$[QT_HOST_PREFIX/src]/lib/fonts/DejaVuSerif-Oblique.ttf
+ DEFAULTFONTS =
+}
+
+if(build_pass:equals(TEMPLATE, "app"))| \
+if(!build_pass:equals(TEMPLATE, "vcapp")) {
+ defined(DEFAULTFONTS, var) {
+ message(Default fonts will automatically be deployed with your application. \
+ To avoid automatic deployment unset the \"FONTS\" variable (\"FONTS =\") in your .pro file. \
+ You can also customize which fonts are deployed by setting the \"FONTS\" variable.)
+ }
+
+ contains(TEMPLATE, "vc.*") {
+ BUILD_DIR = $$OUT_PWD
+ } else {
+ load(resolve_target)
+ BUILD_DIR = $$dirname(QMAKE_RESOLVED_TARGET)
+ }
+
+ for (FONT, FONTS) {
+ font_$${FONT}.input = $$FONT
+ font_$${FONT}.output = $$BUILD_DIR/fonts/$$basename(FONT)
+ font_$${FONT}.CONFIG = verbatim
+ QMAKE_SUBSTITUTES += font_$${FONT}
+ }
+
+ !isEmpty(FONTS):equals(TEMPLATE, "app") {
+ fonts.files = $$BUILD_DIR/fonts/*
+ isEmpty($$target.path) {
+ fonts.path = $$OUT_PWD/fonts
+ } else {
+ fonts.path = $$target.path/fonts
+ }
+
+ INSTALLS += fonts
+ }
+}
+
+!isEmpty(FONTS):winphone:equals(TEMPLATE, "vcapp"):build_pass {
+ fonts.files = $$OUT_PWD/fonts/*
+ fonts.path = fonts
+ DEPLOYMENT += fonts
+}