summaryrefslogtreecommitdiffstats
path: root/system/webcore-fonts/webcore-fonts.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/webcore-fonts/webcore-fonts.SlackBuild')
-rw-r--r--system/webcore-fonts/webcore-fonts.SlackBuild13
1 files changed, 11 insertions, 2 deletions
diff --git a/system/webcore-fonts/webcore-fonts.SlackBuild b/system/webcore-fonts/webcore-fonts.SlackBuild
index 575d7639f2..2af1637fa7 100644
--- a/system/webcore-fonts/webcore-fonts.SlackBuild
+++ b/system/webcore-fonts/webcore-fonts.SlackBuild
@@ -8,7 +8,7 @@
PRGNAM=webcore-fonts
VERSION=${VERSION:-3.0}
ARCH=noarch
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -21,7 +21,7 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
@@ -31,6 +31,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# The Cambria font is a TTC file. If FontForge is available, we use it to split it
+# into two TTFs.
+if type fontforge > /dev/null 2>&1; then
+ fontforge -lang=ff -c 'Open("vista/CAMBRIA.TTC(Cambria)"); \
+ Generate("vista/CAMBRIA.TTF");Close();Open("vista/CAMBRIA.TTC(Cambria Math)"); \
+ Generate("vista/CAMBRIA-MATH.TTF");Close();'
+ rm vista/CAMBRIA.TTC
+fi
+
mkdir -p $PKG/usr/share/fonts/TTF
cp fonts/* $PKG/usr/share/fonts/TTF
cp vista/* $PKG/usr/share/fonts/TTF