head	1.7;
access;
symbols
	RELEASE_4_11_0:1.6
	RELEASE_5_3_0:1.6
	RELEASE_4_10_0:1.6
	RELEASE_5_2_1:1.6
	RELEASE_5_2_0:1.6
	RELEASE_4_9_0:1.6
	RELEASE_5_1_0:1.6
	RELEASE_4_8_0:1.5
	RELEASE_5_0_0:1.5
	RELEASE_4_7_0:1.4
	RELEASE_4_6_2:1.4
	RELEASE_4_6_1:1.4
	RELEASE_4_6_0:1.4
	RELEASE_5_0_DP1:1.4
	RELEASE_4_5_0:1.4
	RELEASE_4_4_0:1.4
	RELEASE_4_3_0:1.4
	RELEASE_4_2_0:1.3
	RELEASE_4_1_1:1.3
	RELEASE_4_1_0:1.3
	RELEASE_3_5_0:1.3
	RELEASE_4_0_0:1.3
	RELEASE_3_4_0:1.3
	RELEASE_3_3_0:1.1.1.1
	v1_1:1.1.1.1
	JTJANG:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2005.02.19.13.51.49;	author leeym;	state dead;
branches;
next	1.6;

1.6
date	2003.04.14.17.58.54;	author leeym;	state Exp;
branches;
next	1.5;

1.5
date	2002.12.21.18.48.37;	author ijliao;	state Exp;
branches;
next	1.4;

1.4
date	2000.12.09.20.09.35;	author keith;	state Exp;
branches;
next	1.3;

1.3
date	99.11.01.18.02.27;	author foxfair;	state Exp;
branches;
next	1.2;

1.2
date	99.10.19.07.58.46;	author foxfair;	state Exp;
branches;
next	1.1;

1.1
date	99.07.18.00.57.34;	author foxfair;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	99.07.18.00.57.34;	author foxfair;	state Exp;
branches;
next	;


desc
@@


1.7
log
@- add chinese/Makefile.ttf to control install/deinstall process of all
  TrueType fonts in chinese/*ttf
- update related Makefile(s) and remove pkg-{install,pkg-deinstall,pkg-plist}
- relocate non-font files to DATADIR or DOCSDIR
- fix "unable to reomve fonts from gscjk" problem in ttfm.sh and gscjk.ttfm
- update chinese/zh-fireflyttf to 1.2.6 [1]

PR:		[1] 77438
Submitted by:	leeym
Approved by:	statue at freebsd.sinica.edu.tw
@
text
@#!/bin/sh

if [ "$2" = "PRE-INSTALL" ]; then
  exit 0
fi

PKGNAME=$1
PREFIX=${PKG_PREFIX}
TTFM=${PREFIX}/bin/ttfm.sh

FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf moe_kai_pc.ttf"
if [ "X$DEFAULT" != "X" ]; then
    DEFAULTMING="moe_sung.ttf"
    DEFAULTKAI="moe_kai.ttf"
fi

TEMPFILE=`mktemp -q /tmp/moettf.XXXX`
XFONTDIR=${X11BASE}/lib/X11/fonts/TrueType

if [ ! -x $TTFM ]; then
    echo "$TTFM not found!"
    exit 1
fi

rm -f $FONTDIR/$PKGNAME

if [ "X$WANT_CJK" != "X" ]; then
    # There's no CJK module now.
fi

if [ "X$WANT_GS" != "X" ]; then
    for f in $FONTS; do
        $TTFM --add gscjk $FONTDIR/$f
    done
    for f in $DEFAULTMING; do
        $TTFM --setdefault gscjk $FONTDIR/$f
    done
    for f in $DEFAULTKAI; do
        $TTFM --setdefault_kai gscjk $FONTDIR/$f
    done
    echo "gscjk" >> $FONTDIR/$PKGNAME
fi

if [ "X$WITHOUT_X" = "X" ]; 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
    sed -e "s/    r        /twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.dir > $TEMPFILE
    mv $TEMPFILE $XFONTDIR/fonts.dir
    sed -e "s/    r        /twmoe_sung/g" -e "s/ t w m o e _ k a i/twmoe_kai/g" $XFONTDIR/fonts.alias > $TEMPFILE
    mv $TEMPFILE $XFONTDIR/fonts.alias
    echo "xttfm" >> $FONTDIR/$PKGNAME
fi

rm -f $TEMPFILE

exit 0
@


1.6
log
@o fix MASTER_SITES
o add new file: moe_kai_pc.ttf
  http://www.edu.tw/mandr/bbs/1-4-2/kai.htm

PR:		50091
Submitted by:	Statue <statue@@freebsd.sinica.edu.tw>
Approved by:	maintainer timeout
@
text
@@


1.5
log
@due to ttfm module ghostscript6 change to gscjk

PR:		42330
Submitted by:	Statue <statue@@freebsd.sinica.edu.tw>
@
text
@d12 1
a12 1
FONTS="moe_lishu.ttf moe_kai.ttf moe_sung.ttf moe_sungext.ttf moe_sungsym.ttf"
d19 1
a19 1
XFONTDIR=/usr/X11R6/lib/X11/fonts/TrueType
@


1.4
log
@Adds two new fonts, moe_sungext.ttf and moe_sungsym.ttf.  Although
the fonts are encoded in BIG5, the characters and symbols are from
several less commonly used layers in CNS.  See
http://www.edu.tw/mandr/bbs/1-4-2/1-4-2.html for more details.

Also displays messages about WANT_XX when installing.
@
text
@d32 1
a32 1
if [ "X$WANT_GS6" != "X" ]; then
d34 1
a34 1
        $TTFM --add ghostscript6 $FONTDIR/$f
d37 1
a37 1
        $TTFM --setdefault ghostscript6 $FONTDIR/$f
d40 1
a40 1
        $TTFM --setdefault_kai ghostscript6 $FONTDIR/$f
d42 1
a42 1
    echo "ghostscript6" >> $FONTDIR/$PKGNAME
@


1.3
log
@PR:		14642
Submitted by:	clive@@CirX.org
Reviewed by:	the maintainer
  Add *-bold-i-* to fonts.alias by default.
@
text
@d2 1
a2 1
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
a3 1
  echo "Please add ${FONTDIR} to your /etc/XF86Config file"
a5 1
cd ${FONTDIR}
d7 58
a64 43
echo "Updating fonts.dir & fonts.alias. This may take a while..."
# Update fonts.dir
touch fonts.dir
sed -e '/ -moe-/d' -e '/ -twmoe-/d' fonts.dir > fonts.dir.tmp
# Add 12 new fonts
numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 12 |bc)
if [ ${numfonts} -le 12 ]; then # fonts.dir.tmp is empty
  echo 12 > fonts.dir
else
  echo ${numfonts} > fonts.dir
  sed -e 1d fonts.dir.tmp >> fonts.dir
fi
rm -f fonts.dir.tmp

# Write font information to fonts.dir
for FAMILY in kai lishu sung
do
  echo moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
  echo ab=y:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
  echo ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
  echo ab=y:ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
done

# Update fonts.alias, font size ranges from 8 to 128.
# Medium/Bold & Roman/Italic variations are also added.
SIZE=8
touch fonts.alias
sed -e '/^-moe-/d' -e '/^-twmoe-/d' fonts.alias > fonts.alias.tmp
mv -f fonts.alias.tmp fonts.alias
for FAMILY in kai lishu sung
do
  (for WEIGHT in medium bold
   do
     (for SLANT in r i
      do
        (while [ ${SIZE} -le 128 ]
         do
           echo -moe-${FAMILY}-${WEIGHT}-${SLANT}-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -twmoe-${FAMILY}-${WEIGHT}-${SLANT}-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias;
           SIZE=`expr ${SIZE} + 1`;
         done)   # SIZE
      done)   # SLANT
   done)   # WEIGHT
done   # FAMILY
@


1.2
log
@PR:			14392
Submitted by:		Keith Jang <jtjang@@gcn.net.tw>
Fix a bug when install this port : fons.dir has an error.
@
text
@d33 1
d40 1
a40 1
  (while [ ${SIZE} -le 128 ]
d42 10
a51 4
     echo -moe-${FAMILY}-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -twmoe-${FAMILY}-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias;
     SIZE=`expr ${SIZE} + 1`;
   done)
done
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
sed -e '/-moe-/d' -e '/-twmoe-/d' fonts.dir > fonts.dir.tmp
d15 9
a23 2
echo ${numfonts} > fonts.dir
sed -e 1d fonts.dir.tmp >> fonts.dir
a30 1
rm -f fonts.dir.tmp
@


1.1.1.1
log
@This port installs Chinese BIG5 TrueType fonts, includes Kai/LiShu/Sung
fonts. It then can be used along with X Window System or typesetting
software like CJK. Restricted usage: end user and non-commericial only.
@
text
@@
