#! /bin/sh /usr/share/dpatch/dpatch-run ## 07_vflib3.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Build with vflib3. @DPATCH@ diff -urNad dvi2ps-4.1j~/Makefile dvi2ps-4.1j/Makefile --- dvi2ps-4.1j~/Makefile 2008-05-15 22:12:25.000000000 +0900 +++ dvi2ps-4.1j/Makefile 2008-05-15 22:13:07.000000000 +0900 @@ -50,7 +50,7 @@ # VFLIB -- FTLIB, FTINC, VFLIB, VFLIBINC FTLIB = -L${PREFIX}/lib -lfreetype FTINC = -I${PREFIX}/include/freetype2 -I${PREFIX}/include -VFLIB = -L${PREFIX}/lib -lVFlib2 -lttf +VFLIB = -L${PREFIX}/lib -lVFlib3 -lt1 VFLIBINC = -I${PREFIX}/include # kpathsea diff -urNad dvi2ps-4.1j~/psvfl.c dvi2ps-4.1j/psvfl.c --- dvi2ps-4.1j~/psvfl.c 2008-05-15 22:10:35.000000000 +0900 +++ dvi2ps-4.1j/psvfl.c 2008-05-15 22:12:25.000000000 +0900 @@ -6,7 +6,7 @@ #include "bifont.h" #include "rastfont.h" #include "ps.h" -#include "VF.h" +#include static struct pd pd; @@ -60,8 +60,8 @@ #define TOKEN_INITIAL 0 #define TOKEN_LINE 1 #define TOKEN_BEZ 2 -#define ConvX(x) ((VFD_GET_X(x)-OUTLINE_OFFSET)) -#define ConvY(x) ((OUTLINE_SIZE-(VFD_GET_Y(x)-OUTLINE_OFFSET))) +#define ConvX(x) ((VF_OL_GET_X(x)-VF_OL_COORD_OFFSET)) +#define ConvY(x) ((VF_OL_COORD_RANGE-(VF_OL_GET_Y(x)-VF_OL_COORD_OFFSET))) #define checklen(l) \ {cc += l; \ @@ -82,17 +82,17 @@ EMITC('{'); EMIT(outfp, "%.3f %.3f scale\n", - (float)w/OUTLINE_SIZE, (float)h/OUTLINE_SIZE); + (float)w/VF_OL_COORD_RANGE, (float)h/VF_OL_COORD_RANGE); ptr = &outline[2]; token = TOKEN_INITIAL; cc = 0; while (*ptr != 0) { - if (*ptr&VFD_TOKEN) { + if (*ptr&VF_OL_INSTR_TOKEN) { cmd = *ptr++; dat = *ptr++;; - if ((cmd&VFD_CWCURV) == VFD_CWCURV || - (cmd&VFD_CCWCURV) == VFD_CCWCURV) { + if ((cmd&VF_OL_INSTR_CWCURV) == VF_OL_INSTR_CWCURV || + (cmd&VF_OL_INSTR_CCWCURV) == VF_OL_INSTR_CCWCURV) { if (token != TOKEN_INITIAL) { if (token == TOKEN_BEZ) { emitdata(initialx, initialy, 'c'); @@ -108,9 +108,9 @@ } else { emitdata(ConvX(dat), ConvY(dat), 'l'); } - if ((cmd&VFD_BEZ) == VFD_BEZ) + if ((cmd&VF_OL_INSTR_BEZ) == VF_OL_INSTR_BEZ) token = TOKEN_BEZ; - else if ((cmd&VFD_LINE) == VFD_LINE) + else if ((cmd&VF_OL_INSTR_LINE) == VF_OL_INSTR_LINE) token = TOKEN_LINE; } else { dat = *ptr++; diff -urNad dvi2ps-4.1j~/vflfont.c dvi2ps-4.1j/vflfont.c --- dvi2ps-4.1j~/vflfont.c 2008-05-15 22:10:35.000000000 +0900 +++ dvi2ps-4.1j/vflfont.c 2008-05-15 22:12:25.000000000 +0900 @@ -110,7 +110,7 @@ (void)fprintf(stderr, "VFlib openfont %s (for %s, %s)\n", vfln, fe->n, raster ? "raster" : "outline"); #endif - if ((fid = VF_OpenFont(vfln)) < 0) { + if ((fid = VF_OpenFont1(vfln)) < 0) { Warning("VFlib font %s cannot be opened", vfln); return vflfi; } @@ -130,7 +130,7 @@ (vflfi->ch+i)->tfmw = tfmw; bzero(pixel, size); c = idx94_to_std(i); - VF_GetBitmap(c, fid, width, height, bwid, 0, pixel); + VF_GetBitmap1(c, fid, width, height, bwid, 0, pixel); trim_bitmap(width, bwid, height, 0, depth, pixel, &nwidth, &nheight, &xoff, &ndepth, &npixel); dev_jft_initfontdict(fe, vflfi, i, c, tfmw,