1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#include <stdio.h>
/*
#include "defs.h"
#include "bifont.h"
*/
typedef unsigned char byte;
byte header[256*4];
byte char_info[256*4];
byte width[256*4];
byte height[256*4];
byte depth[256*4];
byte italic[256*4];
byte lig_kern[1024*4];
byte kern[256*4];
byte exten[256*4];
byte param[32*4];
int lf, lh, bc, ec, nw, nh, nd, ni, nl, nk, ne, np;
int ds;
#define JFM_ID 11
readtfm(fntfp)
register FILE *fntfp;
{
if ((lf = getuint(fntfp, 2)) <= JFM_ID)
return 0;
lh = getuint(fntfp, 2);
bc = getuint(fntfp, 2);
ec = getuint(fntfp, 2);
nw = getuint(fntfp, 2);
nh = getuint(fntfp, 2);
nd = getuint(fntfp, 2);
ni = getuint(fntfp, 2);
nl = getuint(fntfp, 2);
nk = getuint(fntfp, 2);
ne = getuint(fntfp, 2);
np = getuint(fntfp, 2);
getbytes(fntfp, header, lh*4);
ds = makeuint(header+4, 4);
getbytes(fntfp, char_info, (ec-bc+1)*4);
getbytes(fntfp, width, 4*nw);
getbytes(fntfp, height, 4*nh);
getbytes(fntfp, depth, 4*nd);
getbytes(fntfp, italic, 4*ni);
getbytes(fntfp, lig_kern, 4*nl);
getbytes(fntfp, kern, 4*nk);
getbytes(fntfp, exten, 4*ne);
getbytes(fntfp, param, 4*np);
return 1;
}
|