diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-08-17 13:18:14 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-08-21 09:39:57 +0000 |
commit | 79db6fc85647a8b63ce7e450c38baf80294b86b6 (patch) | |
tree | 14ee3d6cf0d9e6f400c39f7a89a485fea314d46c | |
parent | 896bb94c7464eb51db342e63b3cb391e3f08dd48 (diff) |
Do not use font files from boot2qt toolchain
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 <tony.sarajarvi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh | 18 |
1 files 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 |