summaryrefslogtreecommitdiffstats
path: root/snap/hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /snap/hooks
parentInitial commit. (diff)
downloadinkscape-upstream/1.2.2.tar.xz
inkscape-upstream/1.2.2.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'snap/hooks')
-rwxr-xr-xsnap/hooks/configure14
1 files changed, 14 insertions, 0 deletions
diff --git a/snap/hooks/configure b/snap/hooks/configure
new file mode 100755
index 0000000..c9bdc26
--- /dev/null
+++ b/snap/hooks/configure
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+# Small hook to build a system font cache in the Snap's system directory
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+mkdir -p $SNAP_DATA/fontconfig
+
+echo "<fontconfig>" > ${SNAP_DATA}/fontconfig/fonts.conf
+echo "<cachedir>${SNAP_DATA}/fontconfig</cachedir>" >> ${SNAP_DATA}/fontconfig/fonts.conf
+echo "<include ignore_missing=\"yes\">/etc/fonts/fonts.conf</include>" >> ${SNAP_DATA}/fontconfig/fonts.conf
+echo "</fontconfig>" >> ${SNAP_DATA}/fontconfig/fonts.conf
+
+export FONTCONFIG_FILE=${SNAP_DATA}/fontconfig/fonts.conf
+
+exec ${SNAP}/snap/command-chain/snapcraft-runner ${SNAP}/usr/bin/fc-cache --force --system-only --verbose