freebsd-ports/chinese/wangttf/pkg-install
Jing-Tang Keith Jang 1b4ebbb32d Adding supports for zh-CJK, zh-ghostscript6, and X-TT, following
zh-arphicttf's pattern.

Some fonts have problems with X-TT/X-freetype, possibly due to bogus
entries, including wcl-02.ttf, wcl-03.ttf, wcl-05.ttf, wcl-06.ttf, and
wcl-07.ttf.  The rest are displayed correctly.

Further testings showed that all these fonts can't be used in GS6. It
seems that the patched GS6 is confused identifying Big5 and GB TTFs,
so for now only the newer Unicode-encoded TTFs can be used.
2000-12-08 16:23:16 +00:00

55 lines
1.2 KiB
Bash

#!/bin/sh
if [ "$2" = "PRE-INSTALL" ]; then
exit 0
fi
PKGNAME=$1
PREFIX=${PKG_PREFIX}
TTFM=${PREFIX}/bin/ttfm.sh
# No default kai & ming for wangttf.
FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="wcl-01.ttf wcl-02.ttf wcl-03.ttf wcl-04.ttf wcl-05.ttf \
wcl-06.ttf wcl-07.ttf wcl-08.ttf wcl-09.ttf wcl-10.ttf"
[ "X$WANT_X" = "X" ] && WANT_X=YES
if [ ! -x $TTFM ]; then
echo "$TTFM not found!"
exit 1
fi
rm -f $FONTDIR/$PKGNAME
if [ "$WANT_CJK" = "YES" -o "$WANT_CJK" = "yes" ]; then
# There's no CJK module now.
fi
if [ "$WANT_GS6" = "YES" -o "$WANT_GS6" = "yes" ]; then
for f in $FONTS; do
$TTFM --add ghostscript6 $FONTDIR/$f
done
for f in $DEFAULTMING; do
$TTFM --setdefault ghostscript6 $FONTDIR/$f
done
for f in $DEFAULTKAI; do
$TTFM --setdefault_kai ghostscript6 $FONTDIR/$f
done
echo "ghostscript6" >> $FONTDIR/$PKGNAME
fi
if [ "$WANT_X" = "YES" -o "$WANT_X" = "yes" ]; then
for f in $FONTS; do
$TTFM --add xttfm $FONTDIR/$f
done
for f in $DEFAULTMING; do
$TTFM --setdefault xttfm $FONTDIR/$f
done
for f in $DEFAULTKAI; do
$TTFM --setdefault_kai xttfm $FONTDIR/$f
done
echo "xttfm" >> $FONTDIR/$PKGNAME
fi
exit 0