#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;
}
