Index: kit/CHANGELOG
diff -u kit/CHANGELOG:1.9 kit/CHANGELOG:removed
--- kit/CHANGELOG:1.9	Sat Sep  5 00:11:21 1998
+++ kit/CHANGELOG	Mon Nov 29 05:10:03 1999
@@ -1,51 +0,0 @@
-CHANGELOG for magicpoint
-$Id: CHANGELOG,v 1.9 1998/09/04 15:11:21 onoe Exp $
-
-Fri Sep  5 1998  onoe@sm.sony.co.jp
-	* handle key inputs from invoked terminal as pressed on Xserver,
-	  even if the Xserver is running on a remote host.
-
-Mon Aug 26 1998  itojun@iijlab.net
-	* new copyright. (BSDish copyright without clause 3)
-
-Mon Aug 25 1998  itojun@iijlab.net
-	* print.c: better x11/freetype/vflib -> postscript font mapping.
-
-Mon Aug 23 1998  kato@wide.ad.jp
-	* embedded image support (added mgpembed.pl and embed.c)
-
-Mon Aug 22 1998  itojun@iijlab.net
-	* added contrib/xmindpath, MindPath PocketPoint user-level driver.
-
-Fri Jul 10 11:57:59 JST 1998  itojun@iijlab.net
-	* cache gs-generated image file.
-	  Suggested by: luigi@FreeBSD.org
-
-Mon Jul  6 11:38:32 JST 1998  itojun@iijlab.net
-	* capable of handling GB2312 and KSC5601 encoding.
-	  they must be encoded by using iso-2022 like escape sequences.
-	  EUC-cn or EUC-kr does not work.
-	* -x option is added.
-
-Thu Jul  2 18:04:16 JST 1998  itojun@iijlab.net
-	* eliminate gsview.
-	* revamp "xfont" directive. (see SYNTAX for detail)
-
-Thu Jun 25 13:10:28 JST 1998  itojun@iijlab.net
-	* print.c: color postscript support by "mgp2ps -c".
-
-changes between 1.02a and 1.03a:
-	* To allow color name that has space inbetween ("dark blue"), 
-	  color name after directives SHOULD come with doublequote.
-	  Therefore,
-		%fore blue
-	  should be
-		%fore "blue"
-	  At this moment, doublequote can be ommitted for backward
-	  compatibility.  We may require to have doublequote in the future.
-	  Font names and other string parameter obeys the same rule.
-	* %image is now capable of rendering encapsulated postscript files
-	  (*.eps).
-		%image foo.eps
-	  should work fine.
-	  By using -X option, you can specify device name for ghostscript.
Index: kit/configure
diff -u kit/configure:1.63 kit/configure:1.65
--- kit/configure:1.63	Fri Sep 10 16:14:50 1999
+++ kit/configure	Sun Nov 28 23:34:59 1999
@@ -1052,7 +1052,9 @@
  		fi
  		if test -d $dir/include -a -f $dir/include/freetype.h; then
  			ac_cv_ft_include="$dir/include"
- 		fi
+ 		elif test -d $dir/include/freetype -a -f $dir/include/freetype/freetype.h; then
+ 			ac_cv_ft_include="$dir/include/freetype"
+		fi
  		if test "$ac_cv_ft_lib" != "no" -a "$ac_cv_ft_include" != "no"; then
  			LIBS="-L$ac_cv_ft_lib $LIBS"
  			CFLAGS="-I$ac_cv_ft_include $CFLAGS"
@@ -1071,7 +1073,7 @@
 	OPTFLAGS="-I$ac_cv_ft_include $OPTFLAGS"
 	DEPLIBS="$ac_cv_ft_lib/$ac_cv_ft_libpath $DEPLIBS"
  	echo $ac_n "checking for TT_Init_FreeType in -lttf""... $ac_c" 1>&6
-echo "configure:1075: checking for TT_Init_FreeType in -lttf" >&5
+echo "configure:1077: checking for TT_Init_FreeType in -lttf" >&5
 ac_lib_var=`echo ttf'_'TT_Init_FreeType | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1079,7 +1081,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lttf  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1083 "configure"
+#line 1085 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1090,7 +1092,7 @@
 TT_Init_FreeType()
 ; return 0; }
 EOF
-if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1120,14 +1122,14 @@
 fi
 
  	cat > conftest.$ac_ext <<EOF
-#line 1124 "configure"
+#line 1126 "configure"
 #include "confdefs.h"
 #include <freetype.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -1142,16 +1144,16 @@
 EOF
 
 	echo $ac_n "checking for num_CharMaps field in TT_Face_Properties""... $ac_c" 1>&6
-echo "configure:1146: checking for num_CharMaps field in TT_Face_Properties" >&5
+echo "configure:1148: checking for num_CharMaps field in TT_Face_Properties" >&5
  	cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
+#line 1150 "configure"
 #include "confdefs.h"
 #include <freetype.h>
 int main() {
 TT_Face_Properties x; return x.num_CharMaps;
 ; return 0; }
 EOF
-if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   result=yes; cat >> confdefs.h <<\EOF
 #define HAVE_TT_FACE_PROPERTIES_CHARMAPS 1
@@ -1168,7 +1170,7 @@
 fi
 
 echo $ac_n "checking if --disable-vflib option specified""... $ac_c" 1>&6
-echo "configure:1172: checking if --disable-vflib option specified" >&5
+echo "configure:1174: checking if --disable-vflib option specified" >&5
 # Check whether --enable-vflib or --disable-vflib was given.
 if test "${enable_vflib+set}" = set; then
   enableval="$enable_vflib"
@@ -1181,8 +1183,8 @@
 
 if test "$mgp_use_vflib" = "yes"; then
 	echo $ac_n "checking for VFlib library/header""... $ac_c" 1>&6
-echo "configure:1185: checking for VFlib library/header" >&5
-	for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg; do
+echo "configure:1187: checking for VFlib library/header" >&5
+	for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg /usr; do
 		ac_cv_vf_libname=VFlib
 		ac_cv_vf_libdir=no
 		ac_cv_vf_hdrdir=no
@@ -1230,7 +1232,7 @@
 	OPTFLAGS="-I$ac_cv_vf_hdrdir $OPTFLAGS"
 	DEPLIBS="$ac_cv_vf_libdir/$ac_cv_vf_libpath $DEPLIBS"
 	echo $ac_n "checking for VF_Init in -l$ac_cv_vf_libname""... $ac_c" 1>&6
-echo "configure:1234: checking for VF_Init in -l$ac_cv_vf_libname" >&5
+echo "configure:1236: checking for VF_Init in -l$ac_cv_vf_libname" >&5
 ac_lib_var=`echo $ac_cv_vf_libname'_'VF_Init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1238,7 +1240,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l$ac_cv_vf_libname  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1242 "configure"
+#line 1244 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1249,7 +1251,7 @@
 VF_Init()
 ; return 0; }
 EOF
-if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1272,14 +1274,14 @@
 fi
 
 	cat > conftest.$ac_ext <<EOF
-#line 1276 "configure"
+#line 1278 "configure"
 #include "confdefs.h"
 #include <VF.h>
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -1295,7 +1297,7 @@
 
 
 	echo $ac_n "checking for VFlib configuration file""... $ac_c" 1>&6
-echo "configure:1299: checking for VFlib configuration file" >&5
+echo "configure:1301: checking for VFlib configuration file" >&5
 	# Check whether --with-vfontcap or --without-vfontcap was given.
 if test "${with_vfontcap+set}" = set; then
   withval="$with_vfontcap"
@@ -1333,7 +1335,7 @@
 
 if test "$mgp_use_freetype" = "yes"; then
 	echo $ac_n "checking if --enable-freetype-charset16 option specified""... $ac_c" 1>&6
-echo "configure:1337: checking if --enable-freetype-charset16 option specified" >&5
+echo "configure:1339: checking if --enable-freetype-charset16 option specified" >&5
 	# Check whether --enable-freetype-charset16 or --disable-freetype-charset16 was given.
 if test "${enable_freetype_charset16+set}" = set; then
   enableval="$enable_freetype_charset16"
@@ -1358,7 +1360,7 @@
 		OPTFLAGS="$OPTFLAGS -I$i/include"
 		DEPLIBS="$DEPLIBS $i/lib/libpng.a"
 		echo $ac_n "checking for png_write_init in -lpng""... $ac_c" 1>&6
-echo "configure:1362: checking for png_write_init in -lpng" >&5
+echo "configure:1364: checking for png_write_init in -lpng" >&5
 ac_lib_var=`echo png'_'png_write_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1366,7 +1368,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpng  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1370 "configure"
+#line 1372 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1377,7 +1379,7 @@
 png_write_init()
 ; return 0; }
 EOF
-if { (eval echo configure:1381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1413,7 +1415,7 @@
 done
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1417: checking how to run the C preprocessor" >&5
+echo "configure:1419: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1428,13 +1430,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1432 "configure"
+#line 1434 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1445,13 +1447,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1449 "configure"
+#line 1451 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1462,13 +1464,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1466 "configure"
+#line 1468 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1497,7 +1499,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1501: checking for X" >&5
+echo "configure:1503: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -1559,12 +1561,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 1563 "configure"
+#line 1565 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1633,14 +1635,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1637 "configure"
+#line 1639 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -1727,12 +1729,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1731: checking for ANSI C header files" >&5
+echo "configure:1733: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1736 "configure"
+#line 1738 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1740,7 +1742,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1757,7 +1759,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1763 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1775,7 +1777,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1779 "configure"
+#line 1781 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1796,7 +1798,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1800 "configure"
+#line 1802 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1807,7 +1809,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1831,12 +1833,12 @@
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1835: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1837: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1840 "configure"
+#line 1842 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1852,7 +1854,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1876,17 +1878,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1880: checking for $ac_hdr" >&5
+echo "configure:1882: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1885 "configure"
+#line 1887 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1914,12 +1916,12 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1918: checking for working const" >&5
+echo "configure:1920: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1923 "configure"
+#line 1925 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1968,7 +1970,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1989,21 +1991,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1993: checking for inline" >&5
+echo "configure:1995: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 2000 "configure"
+#line 2002 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -2029,12 +2031,12 @@
 esac
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2033: checking for pid_t" >&5
+echo "configure:2035: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2038 "configure"
+#line 2040 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2062,12 +2064,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2066: checking for size_t" >&5
+echo "configure:2068: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2071 "configure"
+#line 2073 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2095,12 +2097,12 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2099: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2101: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2104 "configure"
+#line 2106 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2109,7 +2111,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2130,12 +2132,12 @@
 fi
 
 echo $ac_n "checking for u_int""... $ac_c" 1>&6
-echo "configure:2134: checking for u_int" >&5
+echo "configure:2136: checking for u_int" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2139 "configure"
+#line 2141 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2163,12 +2165,12 @@
 fi
 
 echo $ac_n "checking for u_char""... $ac_c" 1>&6
-echo "configure:2167: checking for u_char" >&5
+echo "configure:2169: checking for u_char" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2172 "configure"
+#line 2174 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2197,7 +2199,7 @@
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2201: checking for 8-bit clean memcmp" >&5
+echo "configure:2203: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2205,7 +2207,7 @@
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2209 "configure"
+#line 2211 "configure"
 #include "confdefs.h"
 
 main()
@@ -2215,7 +2217,7 @@
 }
 
 EOF
-if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -2233,12 +2235,12 @@
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2237: checking return type of signal handlers" >&5
+echo "configure:2239: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2242 "configure"
+#line 2244 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2255,7 +2257,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2276,12 +2278,12 @@
 for ac_func in poll strstr _setbufend
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2280: checking for $ac_func" >&5
+echo "configure:2282: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2285 "configure"
+#line 2287 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2304,7 +2306,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2331,12 +2333,12 @@
 for ac_func in usleep strsep strdup mkstemp snprintf memcmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2335: checking for $ac_func" >&5
+echo "configure:2337: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2340 "configure"
+#line 2342 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2359,7 +2361,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
Index: kit/configure.in
diff -u kit/configure.in:1.60 kit/configure.in:1.62
--- kit/configure.in:1.60	Fri Sep 10 16:14:51 1999
+++ kit/configure.in	Sun Nov 28 23:35:01 1999
@@ -3,7 +3,7 @@
 dnl independent (using srcdir), however, xmkmf and Imake.tmpl do not
 dnl allow us to switch compilation directory.
 dnl
-dnl $Id: configure.in,v 1.60 1999/09/10 07:14:51 itojun Exp $
+dnl $Id: configure.in,v 1.62 1999/11/28 14:35:01 nishida Exp $
 AC_INIT(image/imagetypes.c)
 
 dnl Checks for programs.
@@ -89,7 +89,9 @@
  		fi
  		if test -d $dir/include -a -f $dir/include/freetype.h; then
  			ac_cv_ft_include="$dir/include"
- 		fi
+ 		elif test -d $dir/include/freetype -a -f $dir/include/freetype/freetype.h; then
+ 			ac_cv_ft_include="$dir/include/freetype"
+		fi
  		if test "$ac_cv_ft_lib" != "no" -a "$ac_cv_ft_include" != "no"; then
  			LIBS="-L$ac_cv_ft_lib $LIBS"
  			CFLAGS="-I$ac_cv_ft_include $CFLAGS"
@@ -131,7 +133,7 @@
 
 if test "$mgp_use_vflib" = "yes"; then
 	AC_MSG_CHECKING(for VFlib library/header)
-	for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg; do
+	for dir in /usr/local/VFlib /usr/local/vflib /usr/local /usr/pkg /usr; do
 		ac_cv_vf_libname=VFlib
 		ac_cv_vf_libdir=no
 		ac_cv_vf_hdrdir=no
Index: kit/ctlwords.pl
diff -u kit/ctlwords.pl:1.2 kit/ctlwords.pl:removed
--- kit/ctlwords.pl:1.2	Sat Sep  5 06:05:08 1998
+++ kit/ctlwords.pl	Mon Nov 29 05:10:07 1999
@@ -1,12 +0,0 @@
-#! /usr/bin/perl
-$counter = 0;	# 0 origin
-print "/* generated by ctlwords.awk. do not edit by hand. */\n";
-
-while (<>) {
-	next if (!/^\/\*CTL\*\//);
-	next if ($_ !~ /(CTL_[A-Z0-9]+)/);
-
-	$word = $1;
-	print "#define $word\t$counter\n";
-	$counter++;
-}
Index: kit/draw.c
diff -u kit/draw.c:1.158 kit/draw.c:1.159
--- kit/draw.c:1.158	Sun Nov  7 02:28:42 1999
+++ kit/draw.c	Sun Nov 28 23:35:03 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: draw.c,v 1.158 1999/11/06 17:28:42 nishida Exp $
+ * $Id: draw.c,v 1.159 1999/11/28 14:35:03 nishida Exp $
  */
 
 #include "mgp.h"
@@ -1685,12 +1685,12 @@
 	int private = mgp_flag & FL_PRIVATE;
 
 	image = obj->data.image.image;
-	if (obj->data.image.xzoom != 100 || obj->data.image.yzoom != 100) {
+	if (obj->data.image.xzoom != 100.0 || obj->data.image.yzoom != 100.0) {
 		timage = image;
 		image = zoom(image,
 			obj->data.image.xzoom, obj->data.image.yzoom, verbose);
 		if (!image) {
-			fprintf(stderr, "image zoom (%dx%d) failed in obj_draw_image\n",
+			fprintf(stderr, "image zoom (%0.2fx%0.2f) failed in obj_draw_image\n",
 				obj->data.image.xzoom, obj->data.image.yzoom);
 			exit(1);
 		}
@@ -2457,7 +2457,7 @@
 	int srcwidth, srcheight;
 	int dstwidth, dstheight;
 	int dir, numcolor;
-	int xzoomrate, yzoomrate;
+	float xzoomrate, yzoomrate;
 	int hquality, vquality;
 
 	Image *myimage, *image;
@@ -2535,12 +2535,13 @@
 	}
 #endif
 
-	xzoomrate = 100 * dstwidth / srcwidth;
-	yzoomrate = 100 * dstheight / srcheight;
+	xzoomrate = 100.0 * dstwidth / srcwidth;
+	yzoomrate = 100.0 * dstheight / srcheight;
 
 	/* performace enhance hack for special case */
 	if (dir % 90 == 0) {
-		int *p, *q, *r;
+		float *q;
+		int *p, *r;
 
 		/*
 		 * 0 or 180: reduce width
@@ -2552,13 +2553,13 @@
 
 		/* rely upon use X11 background image tiling. */
 		*p = 1;
-		*q = 100;
+		*q = (float) 100.0;
 		*r = 1;
 	}
 
 	if (verbose) {
 		fprintf(stderr, "raw: %d,%d qu: %d,%d "
-			"dst: %d,%d src: %d,%d zoom: %d,%d\n",
+			"dst: %d,%d src: %d,%d zoom: %0.2f,%0.2f\n",
 			cg->ct_width, cg->ct_height,
 			hquality, vquality,
 			dstwidth, dstheight, srcwidth, srcheight,
@@ -2575,18 +2576,18 @@
 		myimage = reduce(myimage, numcolor, verbose);
 
 	if (verbose) {
-		fprintf(stderr, "background zoomrate: (%d,%d)\n",
+		fprintf(stderr, "background zoomrate: (%0.2f,%0.2f)\n",
 			xzoomrate, yzoomrate);
 		fprintf(stderr, "background zoom mode %d: "
 			"(%d, %d)->(%d, %d)[%d]\n", cg->ct_zoomflag,
 			srcwidth, srcheight, dstwidth, dstheight, b_quality);
 	}
 
-	if (xzoomrate != 100 || yzoomrate != 100) {
+	if (xzoomrate != 100.0 || yzoomrate != 100.0) {
 		image = myimage;
 		myimage = zoom(image, xzoomrate, yzoomrate, verbose);
 		if (!image) {
-			fprintf(stderr, "image zoom (%dx%d) failed in back_gradataion\n",
+			fprintf(stderr, "image zoom (%0.2fx%0.2f) failed in back_gradataion\n",
 				xzoomrate, yzoomrate);
 			exit(1);
 		}
@@ -2641,7 +2642,7 @@
 	XImageInfo *ximageinfo;
 	u_int image_posx;
 	int width, height;
-	int xzoomrate, yzoomrate;
+	float xzoomrate, yzoomrate;
 	int	private = mgp_flag & FL_PRIVATE;
 	static Cursor curs;
 	static char backfile[MAXPATHLEN];
@@ -2700,19 +2701,19 @@
 		else
 			xzoomrate = ximagesize;
 	} else
-		xzoomrate = 100;
+		xzoomrate = 100.0;
 	if (yimagesize != 0) {
 		if (!zoomflag)
 			yzoomrate = state->height * yimagesize / height;
 		else
 			yzoomrate = yimagesize;
 	} else
-		yzoomrate = 100;
+		yzoomrate = 100.0;
 #else
 	if (!ximagesize) ximagesize = 100;
 	if (!yimagesize) yimagesize = 100;
-	xzoomrate = ximagesize;
-	yzoomrate = yimagesize;
+	xzoomrate = (float) ximagesize;
+	yzoomrate = (float) yimagesize;
 	image_zoomratio(state, &xzoomrate, &yzoomrate, zoomflag, width, height);
 #endif
 
@@ -2796,7 +2797,7 @@
 	char fullname[MAXPATHLEN];
 	char *imagefile;
 	int width, height;
-	int xzoom, yzoom;
+	float xzoom, yzoom;
 	char *p;
 
 	/* wait for a while, please. */
@@ -2833,23 +2834,23 @@
 	}
 	if (ximagesize != 0) {
 		if (!zoomflag)
-			xzoom = state->width * ximagesize / width;
+			xzoom = ((float) state->width * ximagesize) / width;
 		else
-			xzoom = ximagesize;
+			xzoom = (float) ximagesize;
 		width = width * xzoom / 100;
 	} else
-		xzoom = 100;
+		xzoom = 100.0;
 	if (yimagesize != 0) {
 		if (!zoomflag)
-			yzoom = state->height * yimagesize / height;
+			yzoom = ((float) state->height * yimagesize) / height;
 		else
 			yzoom = yimagesize;
 		height = height * yzoom / 100;
 	} else
-		yzoom = 100;
+		yzoom = 100.0;
 #else
-	xzoom = ximagesize;
-	yzoom = yimagesize;
+	xzoom = (float) ximagesize;
+	yzoom = (float) yimagesize;
 	image_zoomratio(state, &xzoom, &yzoom, zoomflag, width, height);
 	width = width * xzoom / 100;
 	height = height * yzoom / 100;
Index: kit/mgp.h
diff -u kit/mgp.h:1.113 kit/mgp.h:1.114
--- kit/mgp.h:1.113	Sun Nov  7 02:14:57 1999
+++ kit/mgp.h	Sun Nov 28 23:35:05 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: mgp.h,v 1.113 1999/11/06 17:14:57 itojun Exp $
+ * $Id: mgp.h,v 1.114 1999/11/28 14:35:05 nishida Exp $
  */
 
 #include <stdio.h>
@@ -427,7 +427,7 @@
 		} xfont;
 		struct {
 			Image *image;
-			int xzoom, yzoom;
+			float xzoom, yzoom;
 		} image;
 		struct {
 			u_int itype;
@@ -680,7 +680,7 @@
 
 /* postscript.c */
 extern int ps_boundingbox __P((char *, int *, int *, int *, int *));
-extern void image_zoomratio __P((struct render_state *, int *, int *, int, int, int));
+extern void image_zoomratio __P((struct render_state *, float *, float *, int, int, int));
 
 /* tfont.c */
 extern int tfc_setsize __P((u_int));
Index: kit/mgp2ps.man
diff -u kit/mgp2ps.man:1.7 kit/mgp2ps.man:1.8
--- kit/mgp2ps.man:1.7	Wed Aug 26 14:29:54 1998
+++ kit/mgp2ps.man	Sun Nov 28 23:35:07 1999
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\" 
-.\"	$Id: mgp2ps.man,v 1.7 1998/08/26 05:29:54 itojun Exp $
+.\"	$Id: mgp2ps.man,v 1.8 1999/11/28 14:35:07 nishida Exp $
 .\"
 .Dd November 1997
 .Dt MGP2PS 1
@@ -102,6 +102,8 @@
 and
 .Ar ymargin
 specifies length of the margin area around the edge of the paper.
+.It Fl t
+Use truetypefont instead of psfont (ASCII font only).
 .El
 .Sh SEE ALSO
 .Xr mgp 1
Index: kit/postscript.c
diff -u kit/postscript.c:1.8 kit/postscript.c:1.9
--- kit/postscript.c:1.8	Wed Dec 23 14:23:59 1998
+++ kit/postscript.c	Sun Nov 28 23:35:08 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: postscript.c,v 1.8 1998/12/23 05:23:59 itojun Exp $
+ * $Id: postscript.c,v 1.9 1999/11/28 14:35:08 nishida Exp $
  */
 
 #include "mgp.h"
@@ -88,7 +88,7 @@
 void
 image_zoomratio(state, xp, yp, zoomflag, width, height)
 	struct render_state *state;
-	int *xp, *yp;
+	float *xp, *yp;
 	int zoomflag;
 	int width;	/* width of the image in file */
 	int height;	/* height of the image in file */
@@ -125,7 +125,7 @@
 		}
 
 		fprintf(stderr, "computing zoom: screen=(%d,%d) "
-			"image=(%d,%d) zoom param=(%d/%s,%d/%s)\n",
+			"image=(%d,%d) zoom param=(%0.2f/%s,%0.2f/%s)\n",
 			state->width, state->height,
 			width, height,
 			*xp, xmodestr, *yp, ymodestr);
@@ -208,6 +208,6 @@
 	if (mgp_flag & FL_VERBOSE) {
 		fprintf(stderr, "resulting zoom=(%f,%f)\n", x, y);
 	}
-	*xp = (int)(x * 100);
-	*yp = (int)(y * 100);
+	*xp = (float)(x * 100);
+	*yp = (float)(y * 100);
 }
Index: kit/print.c
diff -u kit/print.c:1.85 kit/print.c:1.86
--- kit/print.c:1.85	Sun Nov  7 02:11:33 1999
+++ kit/print.c	Sun Nov 28 23:35:09 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: print.c,v 1.85 1999/11/06 17:11:33 nishida Exp $
+ * $Id: print.c,v 1.86 1999/11/28 14:35:09 nishida Exp $
  */
 /*
  * Paper size selection code is based on psutil.c by Angus J. C. Duggan
@@ -54,6 +54,10 @@
 static u_int curlinenum;
 static u_int curpagenum;
 
+#ifdef FREETYPE
+static u_int usetfont = 0;
+#endif
+
 static struct imagepool {
 	struct ctrl *image;
 	int xoffset;
@@ -251,6 +255,7 @@
 static void print_32_image __P((XImage *, Visual *));
 static void print_eps __P((FILE *, char *, int, int, int, int, int));
 static struct fontmap *findfont __P((int, int, char *));
+static struct fontmap *findttfont __P((int, int, char *));
 static char *fontstring __P((struct fontmap *));
 static void loadfont __P((struct fontmap *, char *));
 
@@ -1296,7 +1301,7 @@
 {
 	char *epsname;
 	Image *myimage;
-	int xzoom, yzoom;
+	float xzoom, yzoom;
 	struct render_state state;
 
 	if ((epsname = checkeps(cp->ctm_fname))) {
@@ -1326,14 +1331,14 @@
 			break;
 		}
 #else
-		xzoom = xim;
-		yzoom = yim;
+		xzoom = (float) xim;
+		yzoom = (float) yim;
 		state.width = window_width;
 		state.height = window_height;
 		image_zoomratio(&state, &xzoom, &yzoom, cp->ctm_zoomflag,
 			width, height);
-		swidth = width * xzoom / 100;
-		sheight = height * yzoom / 100;
+		swidth = (int) width * xzoom / 100;
+		sheight = (int) height * yzoom / 100;
 #endif
 		pool->xsiz = swidth;
 		pool->ysiz = sheight;
@@ -1369,7 +1374,7 @@
 	XImageInfo *ximageinfo;
 	XImage	*print_image;
 	int width, height;
-	int xzoomrate, yzoomrate;
+	float xzoomrate, yzoomrate;
 	static Cursor curs;
 	u_int	print_width, print_height;
 	struct render_state state;
@@ -1410,20 +1415,20 @@
 #if 0
 	if (ximagesize != 0 && yimagesize != 0) {
 		if (!zoomflag) {
-			xzoomrate = window_width * ximagesize / width;
-			yzoomrate = window_height * yimagesize / height;
+			xzoomrate = (float) window_width * ximagesize / width;
+			yzoomrate = (float) window_height * yimagesize / height;
 		} else {
-			xzoomrate = ximagesize;
-			yzoomrate = yimagesize;
+			xzoomrate = (float) ximagesize;
+			yzoomrate = (float) yimagesize;
 		}
 		image = myimage;
 		myimage = zoom(image, xzoomrate, yzoomrate, verbose);
 		freeImage(image);
 	} else
-		xzoomrate = yzoomrate = 100;
+		xzoomrate = yzoomrate = 100.0;
 #else
-	xzoomrate = ximagesize;
-	yzoomrate = yimagesize;
+	xzoomrate = (float) ximagesize;
+	yzoomrate = (float) yimagesize;
 	state.width = window_width;
 	state.height = window_height;
 	image_zoomratio(&state, &xzoomrate, &yzoomrate, zoomflag,
@@ -1504,7 +1509,7 @@
 print_usage(name)
 	char	*name;
 {
-	fprintf(stderr, "Usage: %s [-cirV] [-f psfile] [-p paper] "
+	fprintf(stderr, "Usage: %s [-cirVt] [-f psfile] [-p paper] "
 		"[-x xmargin] [-y ymargin] [-e encoding] mgpfile\n", name);
 	exit(0);
 }
@@ -1694,7 +1699,7 @@
 	char line[BUFSIZ];
 	int x1, y1, x2, y2, height, width, sheight, swidth;
 	int xpos = 0;
-	int xzoomrate, yzoomrate;
+	float xzoomrate, yzoomrate;
 	double xscale, yscale;
 	int noboundingbox;
 	struct render_state state;
@@ -1751,8 +1756,8 @@
 		break;
 	}
 #else
-	xzoomrate = ximagesize;
-	yzoomrate = yimagesize;
+	xzoomrate = (float) ximagesize;
+	yzoomrate = (float) yimagesize;
 	state.width = window_width;
 	state.height = window_height;
 	image_zoomratio(&state, &xzoomrate, &yzoomrate, zoomflag,
@@ -1814,7 +1819,7 @@
 	/* set default paper size */
 	paper = findpaper(DEFAULT_PAPER_SIZE);
 
-	while ((opt = getopt(argc, argv, "ciVrf:x:y:p:e:P")) != -1) {
+	while ((opt = getopt(argc, argv, "ciVrf:x:y:p:e:Pt")) != -1) {
 		switch (opt) {
 		case 'c':
 			colorps++;
@@ -1871,6 +1876,15 @@
 			parse_debug++;
 			break;
 
+		case 't':
+#ifdef FREETYPE
+			usetfont = 1;
+#else
+			fprintf(stderr, "you can't use this function with this version\n");
+			exit(-1);
+#endif
+			break;
+
 		default:
 			print_usage(progname);
 			/*NOTREACHED*/
@@ -1922,6 +1936,12 @@
 
 	if (!font[0])
 		return NULL;
+
+#ifdef FREETYPE
+	if (lang == ASCII && usetfont)
+		if ((p = findttfont(ctrl, lang, font))) goto found;
+#endif
+
 	for (p = fontmap; 0 <= p->ctrl; p++) {
 		if (p->ctrl != ctrl || p->lang != lang)
 			continue;
@@ -2023,3 +2043,86 @@
 {
 	/* dummy */
 }
+
+#ifdef FREETYPE
+/* 
+	get fontname from ttffile for ttfps 
+ */
+static struct fontmap *
+findttfont(ctrl, lang, font)
+	int ctrl;
+	int lang;
+	char *font;
+{
+	TT_Error	error;
+	TT_Face		face; 
+	TT_Face_Properties	properties;
+	u_short		platform, encoding, language, id;
+	u_short		string_len;
+	struct 		fontmap	*pfont;
+	char		*string;
+	char		pathname[256];
+	int			i, n, found = 0;
+	static TT_Engine	engine;
+	static int	initdone = 0, findex = 0; 
+	static struct fontmap	**loadedfont;
+
+	if (!font) return NULL;
+
+	/* already registed? */
+	for (i = 0; i < findex; i ++){
+		if (!strcmp(font, loadedfont[i]->font)) 
+			return loadedfont[i];
+	}
+
+	if (!initdone){
+		/* Initialize engine */
+		if ((error = TT_Init_FreeType(&engine))){
+			fprintf(stderr, "Error while initializing engine, code = %d.\n",
+				(int)error);
+				exit(-1);
+		}
+		initdone ++;
+	}
+	error = TT_Open_Face(engine, font, &face);
+	if (error) {
+		/* add freetypefontdir and try again */
+		snprintf(pathname, sizeof(pathname), "%s/%s", freetypefontdir, font);
+		error = TT_Open_Face(engine, pathname, &face);
+		if (error) return NULL;
+	}
+
+	TT_Get_Face_Properties(face, &properties);
+	n = properties.num_Names;
+	for (i = 0; i < n; i++) {
+		TT_Get_Name_ID(face, i, &platform, &encoding, &language, &id);
+		TT_Get_Name_String(face, i, &string, &string_len);
+		/* this check may be weak.. */
+		if (*string && id == 6){
+			found = 1;
+			break;
+		}
+	}
+	if (!found) return NULL;
+
+	/* create fontmap */
+	pfont = (struct fontmap *)malloc(sizeof(struct fontmap));
+	pfont->ctrl = ctrl;
+	pfont->lang = lang;
+	pfont->font = font;
+	pfont->psfont = (char *)malloc(string_len +1);
+	strncpy(pfont->psfont, string, string_len);
+	pfont->fontid = 0;
+	pfont->loaded = 0;
+
+	/* regist loaded font */
+	if (!findex)
+		loadedfont = (struct fontmap **)malloc(sizeof(struct fontmap *));
+	else
+		loadedfont = (struct fontmap **)realloc(loadedfont, 
+								sizeof(struct fontmap *) * (findex +1));
+	loadedfont[findex++] = pfont;
+
+	return pfont;
+}
+#endif /* FREETYPE */
Index: kit/image/zoom.c
diff -u kit/image/zoom.c:1.3 kit/image/zoom.c:1.4
--- kit/image/zoom.c:1.3	Mon Dec 28 17:23:32 1998
+++ kit/image/zoom.c	Sun Nov 28 23:35:16 1999
@@ -13,7 +13,7 @@
 
 static unsigned int *buildIndex(width, zoom, rwidth)
      unsigned int  width;
-     unsigned int  zoom;
+     float         zoom;
      unsigned int *rwidth;
 { float         fzoom;
   unsigned int *index;
@@ -38,7 +38,7 @@
 
 Image *zoom(oimage, xzoom, yzoom, verbose)
      Image        *oimage;
-     unsigned int  xzoom, yzoom;
+     float        xzoom, yzoom;
 { char          buf[BUFSIZ];
   Image        *image=NULL;
   unsigned int *xindex, *yindex;
@@ -54,29 +54,29 @@
 
   goodImage(oimage, "zoom");
 
-  if (!xzoom && !yzoom) /* stupid user */
+  if ((xzoom == 0.0) && (yzoom == 0.0)) /* stupid user */
     return(NULL);
 
-  if (!xzoom) {
+  if (xzoom == 0.0) {
     if (verbose)
-      fprintf(stderr, "  Zooming image Y axis by %d%%...", yzoom);
-      sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom);
+      fprintf(stderr, "  Zooming image Y axis by %0.2f%%...", yzoom);
+      sprintf(buf, "%s (Y zoom %0.2f%%)", oimage->title, yzoom);
   }
-  else if (!yzoom) {
+  else if (yzoom == 0.0) {
     if (verbose)
-      fprintf(stderr, "  Zooming image X axis by %d%%...", xzoom);
-    sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom);
+      fprintf(stderr, "  Zooming image X axis by %0.2f%%...", xzoom);
+    sprintf(buf, "%s (X zoom %0.2f%%)", oimage->title, xzoom);
   }
   else if (xzoom == yzoom) {
     if (verbose)
-      fprintf(stderr, "  Zooming image by %d%%...", xzoom);
+      fprintf(stderr, "  Zooming image by %0.2f%%...", xzoom);
     sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom);
   }
   else {
     if (verbose)
-      fprintf(stderr, "  Zooming image X axis by %d%% and Y axis by %d%%...",
+      fprintf(stderr, "  Zooming image X axis by %0.2f%% and Y axis by %0.2f%%...",
 	     xzoom, yzoom);
-    sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title,
+    sprintf(buf, "%s (X zoom %0.2f%% Y zoom %0.2f%%)", oimage->title,
 	    xzoom, yzoom);
   }
   if (verbose)
Index: kit/sample/cloud.gif
Index: kit/sample/dad.gif
Index: kit/sample/mgp-old1.gif
Index: kit/sample/mgp-old2.gif
Index: kit/sample/mgp-old3.gif
Index: kit/sample/mgp1.gif
Index: kit/sample/mgp2.gif
Index: kit/sample/mgp3.gif
Index: kit/sample/v6header.gif
