tags 366031 + patch
thank you
Hi,
Here is a dpatch that will allow dvi2ps to be built with vflib3.
However I fear that runtime might still be an issue as I don't think
there are enough params being passed to VF_OpenFont1() and VF_GetBitmap1().
Hope this helps..
Thanks,
Barry deFreese
#! /bin/sh /usr/share/dpatch/dpatch-run
## 06_vflib3.dpatch by <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Build against vflib3
@DPATCH@
diff -urNad dvi2ps-3.2j~/Makefile dvi2ps-3.2j/Makefile
--- dvi2ps-3.2j~/Makefile 2007-12-22 19:00:22.000000000 -0500
+++ dvi2ps-3.2j/Makefile 2007-12-22 19:01:19.000000000 -0500
@@ -47,7 +47,7 @@
# VFLIB -- FTLIB, FTINC, VFLIB, VFLIBINC
FTLIB = -L${PREFIX}/lib -lttf
FTINC = -I${PREFIX}/include/freetype
-VFLIB = -L${PREFIX}/lib -lVFlib2
+VFLIB = -L${PREFIX}/lib -lVFlib3
VFLIBINC = -I${PREFIX}/include
# kpathsea
diff -urNad dvi2ps-3.2j~/psvfl.c dvi2ps-3.2j/psvfl.c
--- dvi2ps-3.2j~/psvfl.c 1999-09-18 01:41:33.000000000 -0400
+++ dvi2ps-3.2j/psvfl.c 2007-12-22 19:12:24.000000000 -0500
@@ -6,7 +6,7 @@
#include "bifont.h"
#include "rastfont.h"
#include "ps.h"
-#include "VF.h"
+#include <VFlib-3_6.h>
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-3.2j~/vflfont.c dvi2ps-3.2j/vflfont.c
--- dvi2ps-3.2j~/vflfont.c 2000-03-09 04:22:47.000000000 -0500
+++ dvi2ps-3.2j/vflfont.c 2007-12-22 19:13:06.000000000 -0500
@@ -110,7 +110,7 @@
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,