drop vflib support
authormirabilos <t.glaser@tarent.de>
Fri, 19 Jul 2019 16:44:31 +0000 (18:44 +0200)
committermirabilos <mirabilos@evolvis.org>
Fri, 19 Jul 2019 16:44:31 +0000 (18:44 +0200)
20 files changed:
Imakefile.in
README.fonts
README.fonts.jp
SYNTAX
TODO
USAGE
contrib/mgp-mode.el
contrib/mgp-mode20.el
draw.c
font.c [deleted file]
globals.c
grammar.y
js.c
mgp.c
mgp.h
mgp.man
parse.c
print.c
sample/mgprc-sample
scanner.l

index 99ae498..7f05b01 100644 (file)
@@ -4,9 +4,9 @@
 srcdir=        @srcdir@
 VPATH= @srcdir@
 SRCS=  mgp.c draw.c parse.c plist.c print.c globals.c x11.c x11dummy.c \
-       font.c background.c scanner.c grammar.c postscript.c tfont.c \
+       background.c scanner.c grammar.c postscript.c tfont.c \
        embed.c unimap.c
-TPOBJS=        mgp.o draw.o parse.o plist.o globals.o x11.o font.o background.o \
+TPOBJS=        mgp.o draw.o parse.o plist.o globals.o x11.o background.o \
        scanner.o grammar.o postscript.o tfont.o embed.o unimap.o
 PROBJS=        print.o parse.o globals.o x11dummy.o scanner.o grammar.o postscript.o \
        embed.o 
@@ -64,7 +64,6 @@ SpecialObjectRule(plist.o,plist.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(postscript.o,postscript.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(print.o,print.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(x11.o,x11.c, $(DEFS) $(OPTFLAGS))
-SpecialObjectRule(font.o,font.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(tfont.o,tfont.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(x11dummy.o,x11dummy.c, $(DEFS) $(OPTFLAGS))
 SpecialObjectRule(background.o,background.c, $(DEFS) $(OPTFLAGS))
index 85dd010..eae96ed 100644 (file)
@@ -64,28 +64,6 @@ it is installed.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-- Scalable Japanese fonts, with VFLib
-
-For non-Adobe and Adobe scalable fonts, a library called VFLib is
-available from:
-       ftp://gull.se.hiroshima-u.ac.jp/pub/VFlib/.
-MagicPoint implements native support for VFlib library.  You can
-compile the renderer into MagicPoint.  If you have the VFlib library
-(libVFlib.a) somewhere in your system, "configure" script will find
-the library and links the library into the MagicPoint binary.
-
-To avoid compiling libVFlib.a into the MagicPoint binary, you can
-specify --disable-vflib option to "configure" script, as below:
-
-       ./configure --disable-vflib
-
-English fonts will become scalable as well, however, this method is
-not very suitable for western readers since this approach usually uses
-Japanese font files.  The Japanese font files include several thousand
-of letters and will occupies several megabytes on your disk.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 - Scalable Japanese fonts, with FreeType
 
 Recent MagicPoint can use the FreeType library for rendering Japanese
@@ -98,13 +76,6 @@ You also need to specify Japanese truetype font files with 'tmfont'
 directive.  The usage of 'tmfont' directive is described in the SYNTAX
 file.
 
-Note: 
-If you have already installed the VFlib library and you want to use
-the FreeType library to render Japanese fonts, you have to disable
-VFlib as below:
-
-       ./configure --disable-vflib --enable-freetype-charset16
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
                       Advanced/complex methods
@@ -132,35 +103,6 @@ MagicPoint.  You may have to modify some of the FreeType-X11 font
 specification file as well.
 
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-- Scalable Japanese/English fonts, with a VFlib-ready X11 server
-
-There are several project to compiling VFlib into X11 server, or X11
-font server (xfs), for example:
-       http://karin.ip.titech.ac.jp/~takagi/X-VFlib/index.html
-
-By specifying proper XLFD, you can use those scalable fonts with
-MagicPoint.  You may have to modify some of the VFlib-X11 font
-specification file as well.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-- Scalable Japanese fonts, with the VFlib/FreeType-hetero library
-
-It may be really confusing (even for the authors), but there are
-several attempts to merge VFlib and FreeType.  Some try to provide
-functionality of FreeType under VFlib API (FreeType-in-VFlib), and
-others try to do the other way around (VFlib-in-FreeType).
-
-In either cases, you can link the library into MagicPoint itself.
-
-There are, of course, attempts to merge those font renderers into X11
-servers or X11 font servers (xfs).  In this case, you can use scalable
-font by using proper XLFD.
-
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
                            Miscellaneous
index 8d3880c..c6fa083 100644 (file)
@@ -87,29 +87,6 @@ X11\e$BI8=`G[IU$K$D$$$F$$$k$b$N0J30$K$b!"$$$/$D$+$N\e(BAdobe Type1\e$B7A<0$N%U%)%s%
 
 %%%%
 
-- VFlib\e$B$rMxMQ$7$?>l9g\e(B
-
-VFlib
-       ftp://gull.se.hiroshima-u.ac.jp/pub/VFlib/
-\e$B$O3F<o$N%9%1!<%i%V%k%U%)%s%H$r07$&$3$H$,$G$-$k%U%)%s%H!&%(%s%8%s%i%$%V\e(B
-\e$B%i%j$G$9!#\e(B
-
-MagicPoint \e$B$O\e(B VFlib \e$B%i%$%V%i%j$rAH$_9~$`$3$H$G!"MM!9$J7A<0$N%9%1!<%i%V\e(B
-\e$B%k!&%U%)%s%H$rMxMQ$G$-$k$h$&$K$J$j$^$9!#$*;H$$%7%9%F%`$K\e(B VFlib \e$B%i%$%V\e(B
-\e$B%i%j\e(B(libVFlib.a)\e$B$,%$%s%9%H!<%k$5$l$F$$$k>l9g!"\e(BMagicPoint \e$B$N:n@.;~\e(B
-(configure\e$B%9%/%j%W%H<B9T;~\e(B)\e$B$K<+F0E*$KAH$_9~$^$l$k$h$&$K$J$C$F$$$^$9!#\e(B
-
-\e$B$b$7!"\e(BVFlib \e$B%i%$%V%i%j$r4^$^$J$$\e(B MagicPoint \e$B$r:n@.$7$?$$>l9g$O!"\e(B
-       ./configure --disable-vflib
-\e$B$N$h$&$K!"\e(Bconfigure \e$B%9%/%j%W%H$N0z?t$K\e(B --disable-vflib \e$B$r$D$1$F<B9T$7\e(B
-\e$B$F$/$@$5$$!#\e(B
-
-\e$BF|K\8l$N%9%1!<%i%V%k!&%U%)%s%H$rMxMQ$7$F$b1QJ8;z$rH~$7$/=PNO$G$-$^$9$,!"\e(B
-\e$BF|K\8l$N%U%)%s%H$O?t@iJ8;z$N%U%)%s%H$r4^$s$G$$$k4X78>e$H$F$bBg$-$$$N$G!"\e(B
-\e$B1Q8l$7$+MxMQ$7$J$$%f!<%6$K$H$C$F$O$A$g$C$HL5BL$+$b$7$l$^$;$s!#\e(B
-
-%%%%
-
 - FreeType\e$B$NMxMQ\e(B
 
 \e$B8=:_$N\e(BMagicPoint\e$B$G$O\e(BFreeType(http://www.freetype.org/)\e$B$rMxMQ$7$F\e(B TrueType
@@ -123,14 +100,6 @@ MagicPoint \e$B$O\e(B VFlib \e$B%i%$%V%i%j$rAH$_9~$`$3$H$G!"MM!9$J7A<0$N%9%1!<%i%V\e
 'tmfont' directive\e$B$G!"F|K\8l$N\e(BTrueType\e$B%U%)%s%H$r;XDj$7$F$/$@$5$$!#\e(B
 tmfont directive\e$B$N\e(BSYNTAX\e$B$K$D$$$F$O!"\e(BSYNTAX\e$B%U%!%$%k$r;2>H$7$F$/$@$5$$!#\e(B
 
-(*\e$BCm\e(B) VFlib\e$B$,%$%s%9%H!<%k$5$l$F$$$k4D6-$G!"\e(BFreeType\e$B$rMxMQ$7$FF|K\8l%U%)%s%H\e(B
-\e$B$rI=<($7$?$$>l9g$O!"\e(Bconfigure \e$B%9%/%j%W%H$N<B9T;~$K\e(B
-
-       ./configure --disable-vflib --enable-freetype-charset16
-
-\e$B$N$h$&$K%*%W%7%g%s$G\e(B--disable-vflib\e$B$r;XDj$7$F!"\e(BVFlib\e$B$r%j%s%/$7$J$$$h$&$K\e(B
-\e$B$7$F2<$5$$!#\e(B
-
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -178,35 +147,6 @@ TrueType \e$B%U%)%s%H$r\e(B X11 \e$B$N%U%)%s%H$H$7$FMxMQ$G$-$k$h$&$K$J$j$^$9!#\e(B
 \e$B$&$K$J$j$^$9!#\e(B
 
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-- VFlib \e$B$KBP1~$7$?\e(B X11 \e$B%5!<%P$K$h$k%9%1!<%i%V%k!&%U%)%s%H$NMxMQ\e(B
-
-VFlib \e$B$rAH$_9~$s$@\e(B X11 \e$B%5!<%P$*$h$S\e(B X11 \e$B%U%)%s%H!&%5!<%P$rMxMQ$7$F1Q8l\e(B
-\e$B$dF|K\8l$rI=<($G$-$^$9!#\e(B
-
-\e$B$?$H$($P!"\e(B
-       http://karin.ip.titech.ac.jp/~takagi/X-VFlib/index.html
-\e$B$N%5%$%H$G8x3+$5$l$F$$$^$9!#\e(B
-
-\e$B$3$l$i$N%U%)%s%H$N\e(B XLFD \e$B$r;XDj$9$k$3$H$G!"\e(BMagicPoint\e$B$+$iMxMQ$G$-$k$h$&\e(B
-\e$B$K$J$j$^$9!#\e(B
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-- VFlib/FreeType \e$BJ#9g%i%$%V%i%j$K$h$k%9%1!<%i%V%k!&%U%)%s%H$NMxMQ\e(B
-
-VFlib \e$B$H\e(B FreeType \e$B$r9g$o$;$?%i%$%V%i%j$,B8:_$7$^$9!#\e(BVFlib API \e$B$rMxMQ$7\e(B
-\e$B$F\e(B FreeType \e$B$N5!G=$rMxMQ$9$k$b$N$d!"\e(BFreeType \e$B$r3HD%$7$F\e(BVFlib\e$B5!G=$rMxMQ\e(B
-\e$B$G$-$k$h$&$K$9$k$b$N$,$"$j$^$9!#\e(B
-
-\e$B$I$A$i$N>l9g$G$b!"\e(B(\e$B$?$V$s\e(B) MagicPoint \e$B$G$b$=$N$^$^MxMQ$G$-$k$G$7$g$&!#\e(B
-
-\e$B$^$?!"EvA3$G$9$,!"$3$l$i$N%U%)%s%H!&%l%s%@%i$r\e(B X11 \e$B%5!<%P$*$h$S\e(B X11 \e$B%U%)\e(B
-\e$B%s%H!&%5!<%P$KAH$_9~$s$G$$$k>l9g$O!"\e(BMagicPoint \e$B$G$b\e(B XLFD \e$B$r;XDj$9$k$3\e(B
-\e$B$H$G\e(BX\e$B$N%U%)%s%H$H$7$FMxMQ$G$-$^$9!#\e(B
-
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
                           \e$B$=$NB>;(B?$J$3$H\e(B
diff --git a/SYNTAX b/SYNTAX
index c737f4f..e312686 100644 (file)
--- a/SYNTAX
+++ b/SYNTAX
@@ -3,7 +3,6 @@ $Id: SYNTAX,v 1.46 2008/01/18 17:43:20 nishida Exp $
 placement restriction for directives:
                .etc/mgprc      preamble        main pages
                ---             ---             ---
-%vfcap         okay            x               okay
 %tfdir         okay            x               okay
 %tfont0                okay            x               okay
 %default       x               okay            x
@@ -146,9 +145,6 @@ others              x               x               okay
        interpreted as XLFD.  In such a case, you should use "FONTNAME:STYLE"
        or "FONTNAME:style=STYLE".
 
-%vfont "font"
-       <font> :: use VFlib's <font> to draw Kanji characters.
-
 %tfont "font"
        <font> :: use TrueType font <font> to draw ASCII characters.
                <font> can be full pathname, or just filename.  Use %tfdir
@@ -355,10 +351,6 @@ TEXT
        The command has to be placed on a line alone.
        Do not use commas.
 
-%vfcap "filename"
-       Specifies VFlib configuration filename.
-       (allowed in ~/.etc/mgprc, without "%" sign)
-
 %tfdir "dir"
        Specifies where to find TrueType font by default.
        (allowed in ~/.etc/mgprc, without "%" sign)
diff --git a/TODO b/TODO
index 7226e52..95d6ac9 100644 (file)
--- a/TODO
+++ b/TODO
@@ -16,11 +16,9 @@ CONFIGURE_ARGS+=     --prefix=/usr
 CONFIGURE_ARGS+=       --disable-freetype              mutually exclusive with xft2
 CONFIGURE_ARGS+=       --enable-xft2                   BSD: flavour’d
                                [check if still needed with imlib, and whether imlib is enabled]
-CONFIGURE_ARGS+=       --disable-vflib                 BSD: same
 Debian implicit:       --enable-imlib                  BSD: no but will need to cope
 
 #undef FREETYPE FREETYPE_CHARSET16
-#undef VFLIB VFCAP
 #define USE_XFT2
 
 # better to use PATH search
diff --git a/USAGE b/USAGE
index 40cfbf4..3203bfc 100644 (file)
--- a/USAGE
+++ b/USAGE
@@ -76,7 +76,7 @@ Let's take a look at the following example:
        text --- size 5% white thick font
        %fore yellow, size 4
        text --- size 4% yellow thick font 
-       %vfont min
+       %font min
        text --- size 4% yellow standard font 
 
 %tab is a command that directly associates with the line. In
@@ -198,11 +198,10 @@ package(ftp://ftp.dcs.ed.ac.uk/pub/ajcd).
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
-(1) Refrain from using "vfont", "xfont" and "tfont" directive
+(1) Refrain from using "xfont" and "tfont" directive
     directly.  Use "deffont" in preamble and "font" in body instead.
     This should allow people to view your presentation in all the
-    configuration of the renderer.  (i.e. with/without FreeType,
-    with/without VFlib)
+    configuration of the renderer.
 
 (2) Use EPS files for vector image.
 
index 32d088c..5bb99bd 100644 (file)
 ;; MagicPoint directive alist for completing input
 (defvar mgp-directives
   '("size" "fore" "back" "bgrad" "ccolor" "left" "leftfill" "center" "right" 
-    "shrink" "lcutin" "rcutin" "cont" "nodefault" "xfont" "vfont" 
+    "shrink" "lcutin" "rcutin" "cont" "nodefault" "xfont" 
     "tfont" "tfont0" "bar" "image" "prefix" "icon" "bimage" "default"
     "tab" "tabprefix" "page" "vgap" "hgap" "pause" "mark" "again" 
-    "system" "xsystem" "filter" "endfilter" "vfcap" "tfdir" "deffont" 
+    "system" "xsystem" "filter" "endfilter" "tfdir" "deffont" 
     "font" "embed" "endembed" "noop" "linestart" "lineend" "quality")
   "*List of MagicPoint directives for completing input.")
 (defvar mgp-directives-optional nil
                 ("^%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*" nil Yellow)
                 ("^#.*" nil comment)
                 ("\"" "[^\\]\"" string)
-                ("\\<\\(size\\|fore\\|back\\|bgrad\\|ccolor\\|left\\|leftfill\\|center\\|right\\|shrink\\|lcutin\\|rcutin\\|cont\\|nodefault\\|xfont\\|vfont\\|tfont\\|tfont0\\|bar\\|image\\|prefix\\|icon\\|bimage\\|default\\|tab\\|tabprefix\\|page\\|vgap\\|hgap\\|pause\\|mark\\|again\\|system\\|xsystem\\|filter\\|endfilter\\|vfcap\\|tfdir\\|deffont\\|font\\|embed\\|endembed\\|noop\\|linestart\\|lineend\\|quality\\)\\>" nil keyword)
+                ("\\<\\(size\\|fore\\|back\\|bgrad\\|ccolor\\|left\\|leftfill\\|center\\|right\\|shrink\\|lcutin\\|rcutin\\|cont\\|nodefault\\|xfont\\|tfont\\|tfont0\\|bar\\|image\\|prefix\\|icon\\|bimage\\|default\\|tab\\|tabprefix\\|page\\|vgap\\|hgap\\|pause\\|mark\\|again\\|system\\|xsystem\\|filter\\|endfilter\\|tfdir\\|deffont\\|font\\|embed\\|endembed\\|noop\\|linestart\\|lineend\\|quality\\)\\>" nil keyword)
                 ("^%.*" nil defun)
                 ))))))
 
index 11991d2..4cf177c 100644 (file)
 ;; MagicPoint directive alist for completing input
 (defvar mgp-directives
   '("size" "fore" "back" "bgrad" "ccolor" "left" "leftfill" "center" "right" 
-    "shrink" "lcutin" "rcutin" "cont" "nodefault" "xfont" "vfont" 
+    "shrink" "lcutin" "rcutin" "cont" "nodefault" "xfont" 
     "tfont" "tfont0" "bar" "image" "prefix" "icon" "bimage" "default"
     "tab" "tabprefix" "page" "vgap" "hgap" "pause" "mark" "again" 
-    "system" "xsystem" "filter" "endfilter" "vfcap" "tfdir" "deffont" 
+    "system" "xsystem" "filter" "endfilter" "tfdir" "deffont" 
     "font" "embed" "endembed" "noop" "linestart" "lineend" "quality")
   "*List of MagicPoint directives for completing input.")
 (defvar mgp-directives-optional nil
                 ("^#.*" nil comment)
                 ("^%%.*" nil comment)
                 ("\"" "[^\\]\"" string)
-                ("\\<\\(size\\|fore\\|back\\|bgrad\\|ccolor\\|left\\|leftfill\\|center\\|right\\|shrink\\|lcutin\\|rcutin\\|cont\\|nodefault\\|xfont\\|vfont\\|tfont\\|tfont0\\|bar\\|image\\|prefix\\|icon\\|bimage\\|default\\|tab\\|tabprefix\\|page\\|vgap\\|hgap\\|pause\\|mark\\|again\\|system\\|xsystem\\|filter\\|endfilter\\|vfcap\\|tfdir\\|deffont\\|font\\|embed\\|endembed\\|noop\\|linestart\\|lineend\\|quality\\)\\>" nil keyword)
+                ("\\<\\(size\\|fore\\|back\\|bgrad\\|ccolor\\|left\\|leftfill\\|center\\|right\\|shrink\\|lcutin\\|rcutin\\|cont\\|nodefault\\|xfont\\|tfont\\|tfont0\\|bar\\|image\\|prefix\\|icon\\|bimage\\|default\\|tab\\|tabprefix\\|page\\|vgap\\|hgap\\|pause\\|mark\\|again\\|system\\|xsystem\\|filter\\|endfilter\\|tfdir\\|deffont\\|font\\|embed\\|endembed\\|noop\\|linestart\\|lineend\\|quality\\)\\>" nil keyword)
                 ("^%.*" nil defun)
                 )))))
       ((= emacs-major-version 20)
                   "size\\|fore\\|back\\|bgrad\\|ccolor\\|"
                   "left\\|leftfill\\|center\\|right\\|"
                   "shrink\\|lcutin\\|rcutin\\|cont\\|nodefault\\|"
-                  "xfont\\|vfont\\|tfont\\|tfont0\\|"
+                  "xfont\\|tfont\\|tfont0\\|"
                   "bar\\|image\\|prefix\\|icon\\|bimage\\|default\\|"
                   "tab\\|tabprefix\\|page\\|vgap\\|hgap\\|"
                   "pause\\|mark\\|again\\|system\\|xsystem\\|"
-                  "filter\\|endfilter\\|vfcap\\|tfdir\\|"
+                  "filter\\|endfilter\\|tfdir\\|"
                   "deffont\\|font\\|embed\\|endembed\\|noop\\|"
                   "linestart\\|lineend\\|quality\\|include"
                   "\\)\\>"
diff --git a/draw.c b/draw.c
index 85f4416..16cd235 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -87,11 +87,6 @@ static Pixel obj_image_color __P((Image *, Image *, Pixel, int *));
 static Image *obj_image_trans __P((Image *, u_int, u_int));
 static void obj_draw_image __P((Drawable, u_int, u_int, struct render_object *, int));
 static void obj_draw __P((struct render_state *, Drawable, u_int, u_int));
-#ifdef VFLIB
-static int obj_new_vfont __P((struct render_state *, int, int, struct vfont *,
-       int));
-static u_int draw_onechar_vf __P((struct render_state *, u_int, int, int, u_int, u_int));
-#endif
 #ifdef FREETYPE
 static u_int draw_onechar_tf __P((struct render_state *, u_int, int, int,
        u_int, char *, int, int));
@@ -625,12 +620,6 @@ process_direc(state, seenpause)
                char_size[caching] = nonscaled_size[caching];
                break;
 
-#ifdef VFLIB
-       case CTL_VFONT:
-               vfc_setfont(cp->ctc_value);
-               break;
-#endif /*VFLIB*/
-
 #ifdef FREETYPE
        case CTL_TFONT:
                tfc_setfont(cp->ctc2_value1, 0, cp->ctc2_value2);
@@ -830,12 +819,6 @@ process_direc(state, seenpause)
                process_icon(state, cp);
                break;
 
-#ifdef VFLIB
-       case CTL_VFCAP:
-               vfcap_name = cp->ctc_value;
-               break;
-#endif
-
 #ifdef FREETYPE
        case CTL_TFDIR:
                freetypefontdir = cp->ctc_value;
@@ -1336,7 +1319,7 @@ draw_fragment(state, p, len, registry, charset16)
        struct render_object *thislineend;
        u_int startwidth;
        struct render_state backup0, backup;
-       enum { MODE_UNKNOWN, MODE_X, MODE_VFLIB, MODE_FREETYPE }
+       enum { MODE_UNKNOWN, MODE_X, MODE_FREETYPE }
                mode = MODE_UNKNOWN;
        char *p0;
 
@@ -1386,16 +1369,10 @@ draw_fragment(state, p, len, registry, charset16)
                 * Western font:
                 *      If possible, freetype. (in the future) - optional
                 *      X if truely scalable.
-                *      VFlib if it is larger than some size - optional
                 *      otherwise, X.
                 */
                mode = MODE_UNKNOWN;
                if (charset16) {
-#ifdef VFLIB
-                       if (!(mgp_flag & FL_NOVFLIB)
-                        && strncmp(registry, "jisx0208.1983-", 14) == 0)
-                               mode = MODE_VFLIB;
-#endif
 #ifdef FREETYPE_CHARSET16
                        if (!(mgp_flag & FL_NOFREETYPE)
                         && (strncmp(registry, "jisx0208.1983-", 14) == 0 ||
@@ -1430,14 +1407,6 @@ draw_fragment(state, p, len, registry, charset16)
                                if (ts)
                                        mode = MODE_X;
                        }
-#ifdef VFLIB
-# ifdef USE_XDRAWSTRING_ONLY_SMALL
-                       if (!(mgp_flag & FL_NOVFLIB) && mode == MODE_UNKNOWN) {
-                               if (25 < char_size)
-                                       mode = MODE_VFLIB;
-                       }
-# endif /* USE_XDRAWSTRING_ONLY_SMALL */
-#endif
 
                        /* last resort: use X font. */
                        if (mode == MODE_UNKNOWN)
@@ -1448,15 +1417,6 @@ draw_fragment(state, p, len, registry, charset16)
                memcpy(&backup0, state, sizeof(struct render_state));
 
                switch (mode) {
-#ifdef VFLIB
-               case MODE_VFLIB:
-                       char_len = draw_onechar_vf(state, code,
-                               state->linewidth, state->charoff,
-                               registry ? char_size[caching]
-                                        : (char_size[caching] * 4 / 5), /*XXX*/
-                               char_size[caching]);
-                       break;
-#endif
 #ifdef FREETYPE
                case MODE_FREETYPE:
                        /*
@@ -1603,11 +1563,6 @@ obj_free(state, obj)
        if (state->objlast == obj)
                state->objlast = obj->next;
        switch (obj->type) {
-#ifdef VFLIB
-       case O_VFONT:
-               obj->data.vfc->ref--;
-               break;
-#endif /* VFLIB */
 #ifdef FREETYPE
        case O_TFONT:
                obj->data.tfc->ref--;
@@ -1637,33 +1592,6 @@ obj_free(state, obj)
        free(obj);
 }
 
-#ifdef VFLIB
-static int
-obj_new_vfont(state, x, y, vfc, size)
-       struct render_state *state;
-       int x, y;
-       struct vfont *vfc;
-       int size;
-{
-       struct render_object *obj;
-
-       obj = obj_alloc(state);
-       if (obj == NULL)
-               return 0;
-       obj->x = x;
-       obj->y = y;
-       obj->fore = fore_color[caching];
-       obj->type = O_VFONT;
-       obj->data.vfc = vfc;
-       obj->data.vfc->size = size;
-       obj->ascent = obj->data.vfc->ascent - y;
-       obj->descent = obj->data.vfc->descent + y;
-       obj->vertloc = VL_BASE;
-       vfc->ref++;
-       return 1;
-}
-#endif /* VFLIB */
-
 #ifdef FREETYPE
 static int
 obj_new_tfont(state, x, y, tfc)
@@ -2105,13 +2033,6 @@ obj_draw(state, target, xpos, ypos)
 #ifdef RASTERLIB
        bcolor = back_color[caching];
        for (obj = state->obj; obj; obj = obj->next) {
-#ifdef VFLIB
-               if (obj->type == O_VFONT){
-                       xwidth = obj->data.vfc->width;
-                       xheight = obj->data.vfc->height;
-                       break;
-               }
-#endif /* VFLIB */
 #ifdef FREETYPE
                if (obj->type == O_TFONT){
                        xwidth = obj->data.tfc->width;
@@ -2214,13 +2135,6 @@ obj_draw(state, target, xpos, ypos)
                                break;
                        }
                        y += obj->y;
-#ifdef VFLIB
-                       if (obj->type == O_VFONT) {
-                               (void)vfc_image(obj->data.vfc,
-                                       obj->fore, bcolor, xim, x, y);
-                               addarea(vfc);
-                       }
-#endif /* VFLIB */
 #ifdef FREETYPE
                        if (obj->type == O_TFONT) {
                                (void)tfc_image(obj->data.tfc,
@@ -2390,24 +2304,6 @@ obj_draw(state, target, xpos, ypos)
        /* ASSERT(state->objlast == NULL); */
 }
 
-#ifdef VFLIB
-static u_int
-draw_onechar_vf(state, code, x, y, width, height)
-       struct render_state *state;
-       u_int code;
-       int x, y;
-       u_int width, height;
-{
-       struct vfont *vfc;
-
-       vfc = vfc_get(code, width, height, 1);
-       draw_line_itemsize(state, vfc->ascent, vfc->descent, 0);
-
-       obj_new_vfont(state, x, y, vfc, height);
-       return vfc->charlen;
-}
-#endif /* VFLIB */
-
 static char *
 x_fontname(buf, bufsiz, seed, siz, registry)
        char *buf;
diff --git a/font.c b/font.c
deleted file mode 100644 (file)
index d8290e6..0000000
--- a/font.c
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * Copyright (C) 1997 and 1998 WIDE Project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/*
- * $Id: font.c,v 1.26 2000/12/04 09:21:27 nishida Exp $
- */
-
-#include "mgp.h"
-
-#ifdef VFLIB
-
-#define VF_DESCENT     8
-
-int vfcachesize = 3000;        /*XXX*/
-#define        VFHASH_SIZE     255
-
-static char *vf_curname;
-static int vfont_fd = -1;
-static int vfcinitdone;
-static int vfcachecnt;
-static struct vfont vfclru;
-static struct vfont vfcache[VFHASH_SIZE];
-#define        VFCACHE_HASH(w, h, c)   (((c ^ w) ^ h) % VFHASH_SIZE)
-
-int vfcachehit = 0;
-int vfcachemiss = 0;
-
-static void initrevbitmap __P((void));
-
-/*
- * revbitmap: reverse the MSB and LSB of a byte value.
- *     example: revbitmap[0x80] == 0x01, revbitmap[0x55] == 0xaa
- * leftbitmap: the index of leftmost bit in a byte value. (MSB is on the left)
- *     example: leftbitmap[0x80] == 0, leftbitmap[0x19] == 3
- * rightbitmap: the index of rightmost bit in a byte value.
- *     example: rightbitmap[0x80] == 0, rightbitmap[0x19] == 7
- */
-static u_char *revbitmap = NULL;
-static char *leftbitmap = NULL;
-static char *rightbitmap = NULL;
-
-static short ctable[128] = {
-       0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121,
-       0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121,
-       0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121,
-       0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121, 0x2121,
-       0x2121, 0x212a, 0x216d, 0x2174, 0x2170, 0x2173, 0x2175, 0x216c,
-       0x214a, 0x214b, 0x2176, 0x215c, 0x2124, 0x215d, 0x2125, 0x213f,
-       0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337,
-       0x2338, 0x2339, 0x2127, 0x2128, 0x2152, 0x2161, 0x2153, 0x2129,
-       0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347,
-       0x2348, 0x2349, 0x234a, 0x234b, 0x234c, 0x234d, 0x234e, 0x234f,
-       0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357,
-       0x2358, 0x2359, 0x235a, 0x214e, 0x2140, 0x214f, 0x2130, 0x2132,
-       0x212e, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367,
-       0x2368, 0x2369, 0x236a, 0x236b, 0x236c, 0x236d, 0x236e, 0x236f,
-       0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377,
-       0x2378, 0x2379, 0x237a, 0x2150, 0x2143, 0x2151, 0x2141, 0x2121,
-};
-
-static void
-initrevbitmap()
-{
-       int i;
-       int j;
-       u_char x;
-       int right;
-       int left;
-
-       revbitmap = (u_char *)malloc(256 * sizeof(u_char));
-       leftbitmap= (char *)malloc(256 * sizeof(char));
-       rightbitmap= (char *)malloc(256 * sizeof(char));
-       if (!revbitmap || !leftbitmap || !rightbitmap) {
-               fprintf(stderr, "initrevbitmap: malloc failed\n");
-               cleanup(-1);
-       }
-       for (i = 0; i < 256; i++) {
-               right = left = -1;
-               x = 0x00;
-               for (j = 0; j < 8; j++) {
-                       if (i & (0x80 >> j)) {
-                               x |= (1 << j);
-                               right = j;
-                               if (left == -1)
-                                       left = j;
-                       }
-               }
-               revbitmap[i] = x;
-               rightbitmap[i] = right;
-               leftbitmap[i] = left;
-       }
-}
-
-#define        VFC_INSHASH(vfc) {                                              \
-       struct vfont *h, *n;                                            \
-       h = &vfcache[VFCACHE_HASH(vfc->code, vfc->width, vfc->height)]; \
-       n = h->next; vfc->next = n; n->prev = vfc;                      \
-       h->next = vfc; vfc->prev = h;                                   \
-}
-#define        VFC_DELHASH(vfc) {                                              \
-       struct vfont *n, *p;                                            \
-       n = vfc->next; p = vfc->prev;                                   \
-       n->prev = p; p->next = n;                                       \
-}
-#define        VFC_INSLRU(vfc) {                                               \
-       struct vfont *p;                                                \
-       p = vfclru.lruprev; vfc->lruprev = p; p->lrunext = vfc;         \
-       vfclru.lruprev = vfc; vfc->lrunext = &vfclru;                   \
-}
-#define        VFC_DELLRU(vfc) {                                               \
-       struct vfont *n, *p;                                            \
-       n = vfc->lrunext; p = vfc->lruprev;                             \
-       n->lruprev = p; p->lrunext = n;                                 \
-}
-
-static void
-vfc_init()
-{
-       int i;
-       struct vfont *vfc;
-
-       vfc = vfcache;
-       for (vfc = vfcache, i = 0; i < VFHASH_SIZE; vfc++, i++)
-               vfc->next = vfc->prev = vfc;
-       vfclru.lrunext = vfclru.lruprev = &vfclru;
-       vfcinitdone++;
-}
-
-static void
-vfc_free(vfc)
-       struct vfont *vfc;
-{
-       VFC_DELHASH(vfc);
-       VFC_DELLRU(vfc);
-       free(vfc->dbitmap);
-       free(vfc);
-       vfcachecnt--;
-}
-
-static struct vfont *
-vfc_lookup(code, width, height, fontname)
-       u_int code, width, height;
-       char *fontname;
-{
-       struct vfont *vfc, *hvfc;
-
-       hvfc = &vfcache[VFCACHE_HASH(code, width, height)];
-       for (vfc = hvfc->next; vfc != hvfc; vfc = vfc->next) {
-               if (vfc->code == code &&
-                   vfc->width == width &&
-                   vfc->height == height &&
-                   vfc->fontname == fontname) {
-                       vfcachehit++;
-                       VFC_DELLRU(vfc);
-                       VFC_INSLRU(vfc);
-                       return vfc;
-               }
-       }
-       vfcachemiss++;
-       return NULL;
-}
-
-static struct vfont *
-vfc_alloc(code, width, height, fontname)
-       u_int code, width, height;
-       char *fontname;
-{
-       u_int rast = (width + 7) / 8;
-       u_int rast2 = (width * 2 + 7) / 8;
-       u_char *lbitmap;
-       u_char *dbitmap;
-       u_int char_len;
-       struct vfont *vfc;
-       u_int max_x, min_x;
-       u_int ix, iy;
-       u_char data, *bitmap;
-       u_char *s;
-       u_int bsize;
-       u_int vcode;
-       XImage *xim;
-
-       bsize = rast * height;
-       if (code < 128)
-               vcode = ctable[code];
-       else
-               vcode = code;
-       vfc = (struct vfont *)malloc(sizeof(*vfc));
-       if (vfc == NULL) {
-               fprintf(stderr, "vfc_alloc: malloc failed\n");
-               cleanup(-1);
-       }
-       vfc->code = code;
-       vfc->width = width;
-       vfc->height = height;
-       vfc->fontname = vf_curname;
-       vfc->ref = 0;
-       bitmap = (u_char *)malloc(bsize);
-       if (bitmap == NULL) {
-               fprintf(stderr, "vfc_alloc: malloc failed\n");
-               cleanup(-1);
-       }
-#if 1  /* ANTIALIAS */
-/*XXX: TODO: cleanup, optimization */
-       lbitmap = (u_char *)malloc(rast2 * height * 2);
-       dbitmap = (u_char *)malloc(width * height);
-       if (lbitmap == NULL || dbitmap == NULL) {
-               fprintf(stderr, "vfc_alloc: malloc failed\n");
-               cleanup(-1);
-       }
-       memset(lbitmap, 0, rast2 * height * 2);
-       VF_GetBitmap(vcode, vfont_fd, width * 2, height * 2, rast2, 0, lbitmap);
-
-    {
-       int i, j, x1, x2, y, b1, b2;
-       u_char *s1, *s2, *d, *z;
-       static u_char dp[] = { 0, 1, 1, 2 };
-
-       z = dbitmap;
-       d = bitmap;
-       for (j = 0; j < height; j++) {
-               s1 = lbitmap + rast2 * (j * 2);
-               s2 = s1 + rast2;
-               y = 0;
-               for (i = 0, b1 = 7, b2 = 6; i < width; i++, b1--, b2 -= 2) {
-                       if (b1 < 0) {
-                               *d++ = y;
-                               y = 0;
-                               b1 = 7;
-                       }
-                       if (b2 < 0) {
-                               s1++, s2++;
-                               b2 = 6;
-                       }
-                       x1 = (*s1 >> b2) & 0x03;
-                       x2 = (*s2 >> b2) & 0x03;
-                       if (x1 | x2)
-                               y |= 1 << b1;
-                       *z++ = dp[x1] + dp[x2];
-               }
-               *d++ = y;
-               for (i += 2; i < rast * 2; i++)
-                       *d++ = 0;
-       }
-    }
-       free(lbitmap);
-       vfc->dbitmap = dbitmap;
-#else
-       memset(bitmap, 0, bsize);
-       if (!(mgp_flag & FL_OUTLINE)) {
-               VF_GetBitmap(vcode, vfont_fd, width, height, rast, 0, bitmap);
-       } else {  /* OR */
-               u_long *vfdata;
-
-               if ((vfdata = VF_GetOutline(vcode, vfont_fd)) == NULL) {
-                       fprintf(stderr, "Failed to get outline : %04x\n", vcode);
-               } else {
-                       VF_DrawOutline(vfdata, vfont_fd, width, height, rast,
-                               0, bitmap);
-                       VF_FreeOutline(vfdata, vfont_fd);
-               }
-       }
-#endif /*ANTIALIAS*/
-
-       if (!revbitmap)
-               initrevbitmap();
-
-       /* compute right/left boundary */
-       max_x = -1;
-       min_x = -1;
-       for (ix = 0; ix < rast; ix++) {
-               data = 0x00;
-               s = bitmap + ix;
-               for (iy = 0, s = bitmap + ix; iy < height; iy++, s += rast)
-                       data |= *s;
-               if (data) {
-                       max_x = ix * 8 + rightbitmap[data];
-                       if (min_x == -1)
-                               min_x = ix * 8 + leftbitmap[data];
-               }
-       }
-       /* XXX: ".," ... */
-       if (code >= 0x2121 && code <= 0x2125 && max_x < width / 2)
-               max_x += width / 2;
-
-#if 0  /* remove soon */
-       xim = XCreateImage(display, visual, 1,
-               XYBitmap, 0, NULL, width, height, 8, 0);
-       if (xim == NULL) {
-               fprintf(stderr, "vfc_alloc: XCreateImage failed\n");
-               cleanup(-1);
-       }
-       if (xim->bitmap_bit_order == LSBFirst) {
-               /* convert the bit order of image bitmap */
-               for (iy = 0, s = bitmap; iy < height; iy++) {
-                       for (ix = 0; ix < rast; ix++, s++)
-                               *s = revbitmap[*s];
-               }
-       }
-       xim->data = (char *)bitmap;
-       vfc->image = xim;
-#endif
-       /* horizontal gap of 1 dot is included by default */
-       char_len = max_x - min_x + 2;
-       vfc->xoff = min_x;
-       vfc->charlen = vfc->xmax = char_len;
-       vfc->descent = height / VF_DESCENT;
-       vfc->ascent = vfc->height - vfc->descent;
-
-       VFC_INSHASH(vfc);
-       VFC_INSLRU(vfc);
-       vfcachecnt++;
-       return vfc;
-}
-
-struct vfont *
-vfc_get(code, width, height, force)
-       u_int code, width, height;
-       int force;
-{
-       struct vfont *vfc, *nvfc;
-
-       /* sanity check */
-       if (vf_curname == NULL)
-               return NULL;
-
-       if (!vfcinitdone)
-               vfc_init();
-       vfc = vfc_lookup(code, width, height, vf_curname);
-       if (vfc == NULL) {
-               if (vfcachecnt >= vfcachesize) {
-                       if (!force)
-                               return NULL;
-                       vfc = vfclru.lrunext;
-                       while (vfcachecnt >= vfcachesize) {
-                               if (vfc == &vfclru)
-                                       break;
-                               nvfc = vfc->lrunext;
-                               if (vfc->ref == 0)
-                                       vfc_free(vfc);
-                               vfc = nvfc;
-                       }
-               }
-               vfc = vfc_alloc(code, width, height, vf_curname);
-       }
-#if 0
-       fprintf(stderr, "vfc_get: cache=%d, hit=%d, miss=%d\n",
-               vfcachecnt, vfcachehit, vfcachemiss);
-#endif
-       return vfc;
-}
-
-void
-vfc_setfont(fontname)
-       char *fontname;
-{
-       static char *prev_vfcap;
-
-       if ((mgp_flag & FL_NOVFLIB)) {
-               return;
-       }
-
-       if (prev_vfcap != vfcap_name) {
-               /*
-                * Because the string specified by %vfcap is stored in
-                * allocated area and never freed, string compare is not
-                * needed here.
-                */
-               if (prev_vfcap)
-                       VF_Deinit();
-               if (VF_Init(vfcap_name) < 0) {
-                       fprintf(stderr, "Error VF_Init\n");
-                       cleanup(-1);
-               }
-               prev_vfcap = vfcap_name;
-               if (prev_vfcap == NULL)
-                       prev_vfcap = "";        /* XXX: just in case */
-       }
-
-#if 0
-       if (vfont_fd >= 0)
-               VF_CloseFont(vfont_fd);
-#endif 
-
-       vfont_fd = VF_OpenFont(fontname);
-       vf_curname = fontname;
-       if (vfont_fd < 0) {
-               fprintf(stderr, "Can't open vffont %s (vfcap=%s)\n",
-                       fontname, vfcap_name);
-               cleanup(-1);
-       }
-}
-
-XImage *
-vfc_image(vfc, fore, back, xim, bx, by)
-       struct vfont *vfc;
-       long fore, back;
-       XImage *xim;
-       u_int bx, by;
-{
-       int x, y;
-       int maxx;
-       static XColor col[5];
-       u_char d, *s;
-       u_long p;
-       XColor *bcol = NULL, *bc;
-       u_int charlen;
-
-       /* offset the base position */
-       by -= vfc->ascent;
-
-       charlen = vfc->charlen;
-       if (vfc->xoff + charlen > vfc->width)
-               charlen = vfc->width - vfc->xoff;
-
-       if (back == -1) {
-               u_long r, g, b;
-               int dots;
-
-               dots = charlen * vfc->height;
-               bcol = malloc(sizeof(XColor) * dots);
-               if (bcol == NULL)
-                       return NULL;
-               bc = bcol;
-               for (y = 0; y < vfc->height; y++) {
-                       for (x = 0; x < charlen; x++, bc++) {
-                               bc->pixel = XGetPixel(xim, bx+x, by+y);
-                               bc->flags = DoRed|DoGreen|DoBlue;
-                       }
-               }
-               XQueryColors(display, colormap, bcol, dots);
-               r = g = b = 0;
-               for (y = 0; y < vfc->height; y++) {
-                       for (x = 0; x < charlen; x++) {
-                               r += bcol[x].red;
-                               g += bcol[x].green;
-                               b += bcol[x].blue;
-                       }
-               }
-               r /= dots; g /= dots; b /= dots;
-               bc = &col[0];
-               if (bc->red == r && bc->green == g && bc->blue == b)
-                       bc->pixel = back;
-               else {
-                       bc->pixel = ~back;
-                       bc->red   = r; bc->green = g; bc->blue  = b;
-               }
-       }
-       if (fore != col[4].pixel || back != col[0].pixel) {
-               col[4].pixel = fore;
-               col[4].flags = DoRed|DoGreen|DoBlue;
-               if (back != -1) {
-                       col[3].pixel = back;
-                       col[3].flags = DoRed|DoGreen|DoBlue;
-                       XQueryColors(display, colormap, &col[3], 2);
-                       col[0] = col[3];
-               } else {
-                       XQueryColor(display, colormap, &col[4]);
-               }
-               for (x = 3; x > 0; x--) {
-                       col[x].red   = (col[4].red  *x + col[0].red  *(4-x)) /4;
-                       col[x].green = (col[4].green*x + col[0].green*(4-x)) /4;
-                       col[x].blue  = (col[4].blue *x + col[0].blue *(4-x)) /4;
-                       if (!XAllocColor(display, colormap, &col[x])) {
-                               if (verbose)
-                                       printf("vfc_image: cannot allocate color for level %d (using %d)\n", x, x + 1);
-                               col[x].pixel = col[x + 1].pixel;
-                       }
-                       else regist_alloc_colors(&font_clr, &col[x].pixel, 1);
-               }
-       }
-
-       /* XXX: need optimization */
-       s = vfc->dbitmap;
-       bc = bcol;
-       maxx = bx + charlen;
-       for (y = by; y < vfc->height + by; y++) {
-               s += vfc->xoff;
-               for (x = bx; x < maxx; x++) {
-                       if ((d = *s++)) {
-                               p = col[d].pixel;
-                               XPutPixel(xim, x, y, p);
-                       }
-               }
-               s += vfc->width - (vfc->xoff + charlen);
-       }
-       if (mgp_flag & FL_GLYPHEDGE) {
-               /*
-                * for debugging treatment of font metrics, for 16bpp displays
-                */
-               /* pixmap bounding box */
-               for (y = 0; y < vfc->height; y++) {
-                       XPutPixel(xim, bx, by + y, 0xffff);
-                       XPutPixel(xim, bx + charlen - 1, by + y, 0xffff);
-               }
-               for (x = 0; x < charlen; x++) {
-                       XPutPixel(xim, bx + x, by, 0xffff);
-                       XPutPixel(xim, bx + x, by + vfc->height - 1, 0xffff);
-               }
-               /* origin */
-               XPutPixel(xim, bx, by, 0xaaaa);
-               /* baseline */
-               for (x = 0; x < vfc->width; x++)
-                       XPutPixel(xim, bx + vfc->xoff + x, by, 0xaaaa);
-       }
-       if (bcol)
-               free(bcol);
-       return xim;
-}
-
-#endif /* VFLIB */
index f2d8b79..6ded3d8 100644 (file)
--- a/globals.c
+++ b/globals.c
@@ -112,7 +112,6 @@ const struct ctl_words ctl_words[] = {
 /*CTL*/        { CTL_NODEF,            T_VOID, "nodefault", 9 },
 /*CTL*/        { CTL_XFONT,            T_STR,  "xfont", 5 },
 /*CTL*/        { CTL_XFONT2,           T_STR2, "xfont2", 6 },
-/*CTL*/        { CTL_VFONT,            T_STR,  "vfont", 5 },
 /*CTL*/        { CTL_TFONT,            T_STR,  "tfont", 5 },
 /*CTL*/        { CTL_IMAGE,            T_SP,   "image", 5 },
 /*CTL*/        { CTL_BIMAGE,           T_SP,   "bimage", 6 },
@@ -146,7 +145,6 @@ const struct ctl_words ctl_words[] = {
 /*CTL*/        { CTL_TFDIR,            T_STR,  "tfdir", 5 },
 /*CTL*/        { CTL_DEFFONT,          T_STR,  "deffont", 7 },
 /*CTL*/        { CTL_FONT,             T_STR,  "font", 4 },
-/*CTL*/        { CTL_VFCAP,            T_STR,  "vfcap", 5 },
 /*CTL*/        { CTL_TFONT0,           T_STR,  "tfont0", 6 },
 /*CTL*/        { CTL_EMBED,            T_STR,  "embed", 5 },
 /*CTL*/        { CTL_ENDEMBED,         T_VOID, "endembed", 8 },
index b8f40ec..0146ba7 100644 (file)
--- a/grammar.y
+++ b/grammar.y
@@ -776,10 +776,10 @@ pcap_parse()
 %token COMMA NUM DOUBLE ID STR WINSIZ
 %token KW_NOOP KW_DEFAULT KW_TAB KW_SIZE KW_FORE KW_BACK KW_LEFT KW_CENTER
 %token KW_RIGHT KW_SHRINK KW_LCUTIN KW_RCUTIN KW_CONT KW_NODEF KW_XFONT
-%token KW_VFONT KW_IMAGE KW_BIMAGE KW_PAGE KW_HGAP KW_VGAP KW_GAP KW_PAUSE
+%token KW_IMAGE KW_BIMAGE KW_PAGE KW_HGAP KW_VGAP KW_GAP KW_PAUSE
 %token KW_PREFIX KW_AGAIN KW_CCOLOR KW_BAR KW_INCLUDE KW_BGRAD KW_TEXT
 %token KW_LINESTART KW_LINEEND KW_MARK KW_SYSTEM KW_FILTER KW_ENDFILTER
-%token KW_QUALITY KW_ICON KW_LEFTFILL KW_XSYSTEM KW_VFCAP KW_TFONT KW_TFDIR
+%token KW_QUALITY KW_ICON KW_LEFTFILL KW_XSYSTEM KW_TFONT KW_TFDIR
 %token KW_TSYSTEM
 %token KW_DEFFONT KW_FONT KW_TFONT0 KW_EMBED KW_ENDEMBED KW_NEWIMAGE KW_PSFONT
 %token KW_CHARSET KW_TMFONT KW_PCACHE KW_TMFONT0 KW_VALIGN KW_AREA 
@@ -916,15 +916,6 @@ cmd:         KW_NOOP       { $$ = gen_void(CTL_NOOP); }
                          x = atoi($3); y = atoi(strchr($3, 'x') + 1);
                          $$ = gen_image(CTL_BIMAGE, $2, 0, x, y, 2);
                        }
-       | KW_VFONT STRorID      {
-#ifdef VFLIB
-                                 $$ = gen_str(CTL_VFONT, $2);
-#else
-                                 $$ = gen_str(CTL_NOOP, $2);
-                                 yywarn("directive \"vfont\" not supported "
-                                       "in this configuration");
-#endif
-                               }
        | KW_PSFONT STRorID     {
                                        $$ = gen_str2(CTL_PSFONT, $2, "iso8859-1");
                                }
@@ -1016,15 +1007,6 @@ cmd:       KW_NOOP       { $$ = gen_void(CTL_NOOP); }
                        { $$ = gen_icon($2, $3, $4); }
        | KW_ICON ID STRorID NUM
                        { $$ = gen_icon($2, $3, $4); }
-       | KW_VFCAP STR  {
-#ifdef VFLIB
-                         $$ = gen_str(CTL_VFCAP, $2);
-#else
-                         $$ = gen_str(CTL_NOOP, $2);
-                         yywarn("directive \"vfcap\" not supported "
-                               "in this configuration");
-#endif
-                       }
        | KW_TFDIR STR  {
 #ifdef FREETYPE
                          $$ = gen_str(CTL_TFDIR, $2);
diff --git a/js.c b/js.c
index 8df882b..217b4b2 100644 (file)
--- a/js.c
+++ b/js.c
@@ -209,9 +209,6 @@ found:
 #ifdef FREETYPE
                case CTL_TFONT: fonttype = 't'; break;
 #endif
-#ifdef VFLIB
-               case CTL_VFONT: fonttype = 'v'; break;
-#endif
 #if 0
                case CTL_XFONT: fonttype = 'x'; break;
 #endif
diff --git a/mgp.c b/mgp.c
index 72219a2..3cc641a 100644 (file)
--- a/mgp.c
+++ b/mgp.c
@@ -70,10 +70,6 @@ u_long depth_mask;
 
 char *back_clname = DEFAULT_BACK;
 
-#ifdef VFLIB
-char *vfcap_name = VFCAP;
-#endif
-
 #ifdef FREETYPE
 char *freetypefontdir = FREETYPEFONTDIR;
 char *freetypefont0 = NULL;    /* font name to be used as a last resort */
@@ -206,9 +202,6 @@ main(argc, argv)
        char buf[BUFSIZ], *p, *p2;
        extern char *Paths[];
        extern int NumPaths;
-#ifdef VFLIB
-       char *vfont_name = VFONT;
-#endif
        char *ep;
 
        setlocale(LC_CTYPE, "");
@@ -252,7 +245,7 @@ main(argc, argv)
        argv=tmp_argv;
        argc=tmp_argc;
 
-#define ACCEPTOPTS     "Bb:Cc:D:d:E:eF:f:Gg:hlnOoPp:Q:qRST:t:UVvw:X:x:"
+#define ACCEPTOPTS     "Bb:CD:d:E:eF:Gg:hnOoPp:Q:qRST:t:UVvw:X:x:"
        while ((opt = getopt(argc, argv, ACCEPTOPTS)) != -1) {
 #undef ACCEPTOPTS
                switch (opt) {
@@ -271,10 +264,6 @@ main(argc, argv)
                        verbose++;
                        break;
 
-               case 'l':
-                       mgp_flag |= FL_OUTLINE;
-                       break;
-
                case 'G':
                        pg_mode = 1;
                        break;
@@ -283,16 +272,6 @@ main(argc, argv)
                        mgp_flag |= FL_OVER;
                        break;
 
-#ifdef VFLIB
-               case 'c':
-                       vfcap_name = optarg;
-                       break;
-
-               case 'f':
-                       vfont_name = optarg;
-                       break;
-#endif /*VFLIB*/
-
                case 'b':
                        back_clname = optarg;
                        break;
@@ -369,9 +348,7 @@ main(argc, argv)
                        break;
 
                case 'x':
-                       if (strcmp(optarg, "vflib") == 0)
-                               mgp_flag |= FL_NOVFLIB;
-                       else if (strcmp(optarg, "freetype") == 0)
+                       if (strcmp(optarg, "freetype") == 0)
                                mgp_flag |= FL_NOFREETYPE;
                        else if (strcmp(optarg, "xft") == 0)
                                mgp_flag |= FL_NOXFT;
@@ -445,9 +422,6 @@ main(argc, argv)
        if (parse_error)
                exit(-1);
        init_win2();
-#ifdef VFLIB
-       vfc_setfont(vfont_name);
-#endif
 
        signal(SIGCHLD, waitkids);
 
@@ -693,18 +667,9 @@ mgp_usage(name)
        fprintf(stderr, "Usage: %s [opts] mgpfile\n", name);
 
        fprintf(stderr, "\t-b <color>: Specify background color\n");
-#ifdef VFLIB
-       fprintf(stderr, "\t-c <vfcap>: Specify vfontcap file\n");
-#endif /*VFLIB*/
        fprintf(stderr, "\t-d: Demo mode - go through the presentation\n");
-#ifdef VFLIB
-       fprintf(stderr, "\t-f <font>: Specify default vflib font\n");
-#endif /*VFLIB*/
        fprintf(stderr, "\t-g <geometry>: Set window geometry\n");
        fprintf(stderr, "\t-h: Display this help message\n");
-#ifdef VFLIB
-       fprintf(stderr, "\t-l: Do not use outline font on vflib\n");
-#endif /*VFLIB*/
        fprintf(stderr, "\t-n: Disables control key input from tty\n");
        fprintf(stderr, "\t-o: Do not override the window manager\n");
        fprintf(stderr, "\t-p <page>: Start at the specified page\n");
diff --git a/mgp.h b/mgp.h
index d1ba093..d1919ad 100644 (file)
--- a/mgp.h
+++ b/mgp.h
 #define USE_XDRAWSTRING_ONLY_SMALL
 #endif
 
-#ifdef VFLIB
-#include "VF.h"
-#define VFONT  "minsl"
-
-#ifndef VFCAP
-#define VFCAP  "/usr/local/lib/VFlib/vfontcap"
-#endif
-
-#endif /* end of VFLIB */
-
 #ifdef FREETYPE
 #include "freetype.h"
 
 #define FL_BIMAGE      0x0002
 #define FL_DEMO                0x0004
 #define FL_VERBOSE     0x0008
-#define FL_OUTLINE     0x0010
 #define FL_NOBEEP      0x0020
 #define FL_NOFORK      0x0080
 #define FL_PRIVATE     0x0100
 #define FL_NODECORATION        0x0200
 #define FL_NOAUTORELOAD        0x0400
-#define FL_NOVFLIB     0x0800
 #define FL_NOFREETYPE  0x1000
 #define        FL_NOSTDIN      0x2000
 #define        FL_GLYPHEDGE    0x4000
@@ -464,9 +452,6 @@ struct render_object {
 #define VL_BOTTOM      3
 #define VL_ICENTER     4
        enum {
-#ifdef VFLIB
-               O_VFONT,
-#endif /* VFLIB */
 #ifdef FREETYPE
                O_TFONT,
 #endif /* FREETYPE */
@@ -479,9 +464,6 @@ struct render_object {
        } type;
        u_long fore;
        union {
-#ifdef VFLIB
-               struct vfont *vfc;
-#endif /* VFLIB */
 #ifdef FREETYPE
                struct tfont *tfc;
 #endif /* FREETYPE */
@@ -516,28 +498,6 @@ struct render_object {
        } data;
 };
 
-#ifdef VFLIB
-struct vfont {
-       struct vfont *next;
-       struct vfont *prev;
-       struct vfont *lrunext;
-       struct vfont *lruprev;
-       u_int size;
-       u_int width;
-       u_int bwidth;
-       u_int height;
-       u_int code;
-       u_int charlen;
-       u_int xmax;
-       int ascent;
-       int descent;
-       u_int xoff;
-       char *fontname;
-       u_char *dbitmap;
-       u_int ref;
-};
-#endif /* VFLIB */
-
 #ifdef FREETYPE
 struct tfont {
        struct tfont *next;
@@ -672,9 +632,6 @@ extern u_int t_fin;
 extern u_int tbar_mode;
 extern u_long pl_fh, pl_fw;
 extern u_long depth_mask;
-#ifdef VFLIB
-extern char *vfcap_name;
-#endif
 #ifdef FREETYPE
 extern char *freetypefontdir;
 extern char *freetypefont0;    /* font name to be used as a last resort */
@@ -745,11 +702,6 @@ extern void pg_clean __P((void));
 extern void pg_draw __P((struct render_state *));
 extern void pg_off __P((void));
 
-/*font.c*/
-extern struct vfont *vfc_get __P((u_int, u_int, u_int, int));
-extern void vfc_setfont __P((char *));
-extern XImage *vfc_image __P((struct vfont *, long, long, XImage *, u_int, u_int));
-
 /*x11.c or x11dummy.c*/
 extern int window_x;
 extern int window_y;
@@ -801,9 +753,6 @@ extern void usleep __P((u_int));
 #ifdef FREETYPE
 #define RASTERLIB
 #endif
-#ifdef VFLIB
-#define RASTERLIB
-#endif
 
 #if 1
 #define DITHERED_BGRAD
diff --git a/mgp.man b/mgp.man
index d4a7c45..78211a8 100644 (file)
--- a/mgp.man
+++ b/mgp.man
 .\"
 .Sh SYNOPSIS
 .Nm mgp
-.Op Fl dhlnoqvBCGORSV
+.Op Fl BCdGhnOoqRSVv
 .Op Fl b Ar bgcolor
-.Op Fl c Ar vfcap
-.Op Fl f Ar vfont
 .Op Fl g Ar geometry
 .Op Fl p Ar page
 .Op Fl t Ar timeslot
@@ -80,9 +78,6 @@ onto the presentation file.
 uses Japanese/English fonts in various sizes.
 .Nm
 uses X11 scalable fonts provided by X11 servers.
-.Nm
-can also utilize the Japanese outline font library, "VFlib",
-if configured to do so at compilation time.
 .Pp
 The following options are available:
 .Bl -tag -width indent
@@ -90,8 +85,6 @@ The following options are available:
 Set background color to
 .Ar bgcolor .
 (The default value is black)
-.It Fl c Ar vfcap
-Specify a VFlib configuration file.
 .It Fl d [ Ar interval ]
 Demonstration mode.
 Browse all page automatically, spending 
@@ -99,9 +92,6 @@ Browse all page automatically, spending
 secounds on each page and terminate. If 
 .Ar interval 
 is not specified, it will be set to 0.
-.It Fl f Ar vfont
-Specify the font name to be used by VFlib.
-(The default value is minsl)
 .It Fl g Ar geometry
 Set the size and location of the window.
 Please note that
@@ -112,12 +102,6 @@ implies
 will not override the window manager if you specify the geometry.
 .It Fl h
 Display the usage and exit without performing a presentation.
-.It Fl l
-There are two kind of fonts available by VFlib;
-They are outline font and bitmap font.
-By specifying
-.Fl l ,
-you can disable the use of outline fonts.
 .It Fl n
 .Nm
 accepts any key inputs from invoked terminal as
@@ -165,8 +149,6 @@ Do not use rendering engine, specified by
 .Ar engine .
 .Ar engine
 can be
-.Li VFlib
-or
 .Li FreeType .
 .It Fl B
 Omit background image.
diff --git a/parse.c b/parse.c
index e307282..fe72008 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -337,11 +337,6 @@ read_rc(fp, filename)
                        }
                        break;
 #endif
-#ifdef VFLIB
-               case CTL_VFCAP:
-                       vfcap_name = root->ctc_value;
-                       break;
-#endif
 #ifdef FREETYPE
                case CTL_TFDIR:
                        freetypefontdir = root->ctc_value;
@@ -956,13 +951,8 @@ thirdpass()
        /* default value for page 1 */
        tmpstr[0] = ctlalloc1(CTL_PREFIX);
        tmpstr[0]->ctc_value = strdup("");
-#if defined(VFLIB) && defined(VFONT)
-       tmpstr[1] = ctlalloc1(CTL_VFONT);
-       tmpstr[1]->ctc_value = strdup(VFONT);           /*XXX*/
-#else
        tmpstr[1] = ctlalloc1(CTL_NOOP);
        tmpstr[1]->ctc_value = strdup("");
-#endif
        tmpstr[2] = ctlalloc1(CTL_XFONT2);
        tmpstr[2]->ctc2_value1 = strdup(DEFAULT_X_FONT);
        tmpstr[2]->ctc2_value2 = strdup("iso8859-1");
@@ -1084,7 +1074,6 @@ thirdpass()
                             cp = cp->ct_next) {
                                switch (cp->ct_op) {
                                case CTL_PREFIX: tmpstr[0] = cp; break;
-                               case CTL_VFONT: tmpstr[1] = cp; break;
                                case CTL_TFONT: tmpstr[3] = cp; break;
 #ifdef FREETYPE_CHARSET16
                                case CTL_TMFONT: tmpstr[4] = cp; break;
diff --git a/print.c b/print.c
index 05f9d08..eef8342 100644 (file)
--- a/print.c
+++ b/print.c
@@ -97,9 +97,6 @@ static int ntextpool = 0;
 u_long fore;
 u_long back;
 
-#ifdef VFLIB
-char *vfcap_name = NULL;       /*dummy*/
-#endif
 #ifdef FREETYPE
 char *freetypefontdir = NULL;  /*dummy*/
 char *freetypefont0 = NULL;    /*dummy*/
@@ -120,10 +117,6 @@ static struct fontmap {
        int fontid;     /* flag bit for generating font map */
        int loaded;
 } fontmap[] = {
-#ifdef VFLIB
-       { CTL_VFONT, KANJI, "goth",             "GothicBBB-Medium-H" },
-       { CTL_VFONT, KANJI, "*",                "Ryumin-Light-H" },
-#endif /*VFLIB*/
 #ifdef FREETYPE
        { CTL_TFONT, ASCII, "schlbk.ttf",       "NewCenturySchlbk-Roman" },
        { CTL_TFONT, ASCII, "schlbki.ttf",      "NewCenturySchlbk-Italic" },
@@ -428,15 +421,6 @@ scan_font(page)
                /* process normal control */
                for (cp = page_control[page][line]; cp; cp = cp->ct_next) {
                        switch(cp->ct_op) {
-#ifdef VFLIB
-                       case CTL_VFONT:
-                               font = findfont(cp->ct_op, KANJI,
-                                       cp->ctc_value);
-                               if (font)
-                                       curfont[KANJI] = font;
-                               break;
-#endif /*VFLIB*/
-
                        case CTL_PSFONT:
                                font = findfont(cp->ct_op,ASCII,cp->ctc_value);
                                if(font)
@@ -808,13 +792,6 @@ process_direc_print(cp)
                if(font)
                        curfont[ASCII] = font;
                break;  
-#ifdef VFLIB
-       case CTL_VFONT:
-               font = findfont(cp->ct_op, KANJI, cp->ctc_value);
-               if (font)
-                       curfont[KANJI] = font;
-               break;
-#endif /*VFLIB*/
 
 #ifdef FREETYPE
        case CTL_TFONT:
@@ -2529,9 +2506,6 @@ found:
 #ifdef FREETYPE
                case CTL_TFONT: fonttype = 't'; break;
 #endif
-#ifdef VFLIB
-               case CTL_VFONT: fonttype = 'v'; break;
-#endif
 #if 0
                case CTL_XFONT: fonttype = 'x'; break;
 #endif
index ccc6a73..acb3a0d 100644 (file)
@@ -3,9 +3,6 @@
 #
 
 # setting up font directories.
-# "vfcap" is commented out because it will be guessed by "configure"
-# in most cases.
-#vfcap "/usr/local/libdata/vflib/vfontcap"
 tfdir "/usr/local/share/fonts/ttf"
 
 # last resort font for TrueType renderer (FreeType).
index 228390c..4aa7c70 100644 (file)
--- a/scanner.l
+++ b/scanner.l
@@ -125,7 +125,6 @@ XSTR        [\240-\377]*
 (CONT|cont)            return KW_CONT;
 (NODEFAULT|nodefault)  return KW_NODEF;
 (XFONT|xfont)          return KW_XFONT;
-(VFONT|vfont)          return KW_VFONT;
 (TFONT|tfont)          return KW_TFONT;
 (TMFONT|tmfont)                return KW_TMFONT;
 (IMAGE|image)          return KW_IMAGE;
@@ -153,7 +152,6 @@ XSTR        [\240-\377]*
 (ENDFILTER|endfilter)  return KW_ENDFILTER;
 (BQUALITY|bquality)    return KW_QUALITY;
 (ICON|icon)            return KW_ICON;
-(VFCAP|vfcap)          return KW_VFCAP;
 (TFDIR|tfdir)          return KW_TFDIR;
 (DEFFONT|deffont)      return KW_DEFFONT;
 (TFONT0|tfont0)                return KW_TFONT0;