From 79db6fc85647a8b63ce7e450c38baf80294b86b6 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Thu, 17 Aug 2017 13:18:14 +0300 Subject: Do not use font files from boot2qt toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously font configuration files were used from the host system. Updating the toolchain to Morty introduces Cantarell font which causes toolchain fonts to be used by Qemu. This change forces also the actual font files to be used from the host system regardless of what is in the toolchain. Task-number: QTBUG-62528 Change-Id: I00de0baa952c9b898edc6b9da8d1d8814f6c722b Reviewed-by: Tony Sarajärvi Reviewed-by: Simon Hausmann --- .../qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh index 9c906562..20fb83ad 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh @@ -66,13 +66,23 @@ sudo update-binfmts --package qemu-arm --install arm \ sudo DEBIAN_FRONTEND=noninteractive apt-get -y remove fonts-noto-cjk # If normal fontconfig paths are used, qemu parses what ever files it finds from -# the toolchain sysroot and the rest from the system fonts. Fix by copying the -# system font configurations to a location which prefix that can't be found from -# the toolchain sysroot. Links must also be dereferenced or their targets remain -# pointing to the toolchain sysroot. +# the toolchain sysroot and the rest from the system fonts. QEMU_FONTCONFPATH=~/qemu_fonts QEMU_FONTCONFFILE=$QEMU_FONTCONFPATH/fonts.qemu.conf mkdir -p $QEMU_FONTCONFPATH + +# Copy system font configuration files from system to a location with prefix that can't be found from +# the toolchain sysroot cp -Lr /etc/fonts/* $QEMU_FONTCONFPATH + +# Create links to the actual system font files +ln -s /usr/share/fonts $QEMU_FONTCONFPATH/fonts +ln -s /usr/local/share/fonts $QEMU_FONTCONFPATH/local_fonts + +# Change font configuration file to point to files that can't be found from the toolchain sysroot sed $QEMU_FONTCONFPATH/fonts.conf -e "s:conf.d:$QEMU_FONTCONFPATH/conf.d:" > $QEMU_FONTCONFFILE +sed $QEMU_FONTCONFFILE -e "s:/usr/share/fonts:$QEMU_FONTCONFPATH/fonts:" -i +sed $QEMU_FONTCONFFILE -e "s:/usr/local/share/fonts:$QEMU_FONTCONFPATH/local_fonts:" -i + +# Set QEMU font configuration variables echo "export QEMU_SET_ENV=\"FONTCONFIG_FILE=$QEMU_FONTCONFFILE,FONTCONFIG_PATH=$QEMU_FONTCONFPATH\"" >> ~/.profile -- cgit v1.2.3