aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/ttfm
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2005-08-28 23:43:47 +0800
committerclive <clive@FreeBSD.org>2005-08-28 23:43:47 +0800
commit85f9c73f8b65e524116fe95bb1918ff89f7a36e2 (patch)
treee2c8695ce8b3fc4a13684aec4c34e6e7b0a03f67 /chinese/ttfm
parentc677d8d22aca123e32b928530a613ab21f86a6ec (diff)
downloadfreebsd-ports-gnome-85f9c73f8b65e524116fe95bb1918ff89f7a36e2.tar.gz
freebsd-ports-gnome-85f9c73f8b65e524116fe95bb1918ff89f7a36e2.tar.zst
freebsd-ports-gnome-85f9c73f8b65e524116fe95bb1918ff89f7a36e2.zip
Let mkfontscale(1) and mkfontdir(1) handle fonts.scale and fonts.dir.
PR: ports/76658
Diffstat (limited to 'chinese/ttfm')
-rw-r--r--chinese/ttfm/Makefile1
-rw-r--r--chinese/ttfm/files/patch-modules_xttfm.ttfm54
2 files changed, 55 insertions, 0 deletions
diff --git a/chinese/ttfm/Makefile b/chinese/ttfm/Makefile
index c9038994415d..4ac4917c8d10 100644
--- a/chinese/ttfm/Makefile
+++ b/chinese/ttfm/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ttfm
PORTVERSION= 0.9.5
+PORTREVISION= 1
CATEGORIES= chinese print
MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/statue/ttfm/
diff --git a/chinese/ttfm/files/patch-modules_xttfm.ttfm b/chinese/ttfm/files/patch-modules_xttfm.ttfm
new file mode 100644
index 000000000000..8648991f6037
--- /dev/null
+++ b/chinese/ttfm/files/patch-modules_xttfm.ttfm
@@ -0,0 +1,54 @@
+--- modules/xttfm.ttfm.orig Tue Nov 4 07:08:32 2003
++++ modules/xttfm.ttfm Sun Aug 28 18:03:43 2005
+@@ -87,15 +87,11 @@
+ targetname=`basename $f`
+
+ # Update fonts.scale
+- rm -f $TEMPFILE
+- if [ ! -r $XTTFFONTPATH/fonts.scale ]; then
+- touch $XTTFFONTPATH/fonts.scale
+- fi
+- sed -e "/$targetname/d" $XTTFFONTPATH/fonts.scale > $TEMPFILE
+- i=`cat $TEMPFILE |wc -l`
+- sed -e "1s/[0-9]*/`expr $i - 1`/" $TEMPFILE > $XTTFFONTPATH/fonts.scale
++ rm -f $XTTFFONTPATH/fonts.scale
++ mkfontscale $XTTFFONTPATH
+
+ # Update fonts.dir, encodings.dir is needed for the sake of xfs.
++ rm -f $XTTFFONTPATH/fonts.dir
+ if [ -r $XTTFFONTPATH/../encodings/large/encodings.dir ]; then
+ mkfontdir -e $XTTFFONTPATH/../encodings/large $XTTFFONTPATH
+ else
+@@ -133,29 +129,11 @@
+ fontencoding=${10}
+
+ # Create and update fonts.scale
+- touch $XTTFFONTPATH/fonts.scale
+- # Delete the first line, and duplicate entries if exist.
+- # We can't use uniq(1) here, since filenames may start with numbers.
+- sed -e "1d" $XTTFFONTPATH/fonts.scale |grep -iv "$fontfoundry-$fontfamily.*-$fontencoding$" > $TEMPFILE
+-
+- # Set font parameters
+- # Speed up font rendering
+- fontparam="vl=y:"
+- # Specify the font face index
+- if [ $facenum -gt 1 ]; then
+- fontparam="fn=$faceindex:$fontparam"
+- fi
+- echo "${fontparam}$targetname -$fontfoundry-$fontfamily-$fontweight-$fontslant-$fontwidth--0-0-0-0-$fontproperties-0-$fontencoding" >> $TEMPFILE
+- # If it's medium-r, make a {medium,bold}-{i,r} full suite
+- if [ "X$fontweight" = "Xmedium" ] && [ "X$fontslant" = "Xr" ]; then
+- echo "${fontparam}ai=0.3:$targetname -$fontfoundry-$fontfamily-medium-i-$fontwidth--0-0-0-0-$fontproperties-0-$fontencoding" >> $TEMPFILE
+- echo "${fontparam}ds=y:$targetname -$fontfoundry-$fontfamily-bold-r-$fontwidth--0-0-0-0-$fontproperties-0-$fontencoding" >> $TEMPFILE
+- echo "${fontparam}ds=y:ai=0.3:$targetname -$fontfoundry-$fontfamily-bold-i-$fontwidth--0-0-0-0-$fontproperties-0-$fontencoding" >> $TEMPFILE
+- fi
+- echo `cat $TEMPFILE |wc -l` > $XTTFFONTPATH/fonts.scale
+- cat $TEMPFILE >> $XTTFFONTPATH/fonts.scale
++ rm -f $XTTFFONTPATH/fonts.scale
++ mkfontscale $XTTFFONTPATH
+
+ # Update fonts.dir, encodings.dir is needed for the sake of xfs.
++ rm -f $XTTFFONTPATH/fonts.dir
+ if [ -r $XTTFFONTPATH/../encodings/large/encodings.dir ]; then
+ mkfontdir -e $XTTFFONTPATH/../encodings/large $XTTFFONTPATH
+ else