/*
 *	@(#)term_font.h	1.6 (UKC) 17/10/88 - definitions for term_font.c
 *	Martin Guy, UKC, September 1988
 */

typedef unsigned char uchar;	/* for holding small +ve or 0 numbers */

/* Characteristics of the various fonts */

extern struct term_font {
	int tf_width;	/* width of char in pixels (how much the printing
			 * position advances by when you print it) */
	int tf_height;	/* height in pixels of character square */
	int tf_size;	/* "point size" equivalent in pixels */
	uchar *tf_hoffset;
			/* horizontal distance from plotting position to the
			 * character's reference point (usually positive).
			 * Indexed with offset of 33 cos 0..32 are unprintable.
			 */
	int tf_voffset; /* vertical offset */
	int tf_select;	/* what to send in \033[%dm to select the font */
	char *tf_name;	/* Font name for debugging */
	struct charraster *tf_raster;
} term_font[];

/*
 * Symbolic names for the built-in font numbers
 * Must match order in term_font.c, viz (0,1,2,3) = (8x10,6x8,8x16,7x10)
 */
#define TF_8x10 0
#define TF_6x8	1
#define TF_8x16	2
#define TF_7x10 3

/* current font number */
extern int term_curfont;

/* Structure describing the bitmaps for characters not in the internal set */
struct charraster {
	short cr_framboozle;	/* Encoded 2-char name. */
	int cr_hoffset;		/* Where the reference point is in the grid: */
	int cr_voffset;		/* (0,0) means it is the top left corner of the grid.
				 * Positive offsets are the norm - right and down;
				 * hoffset will normally be 0 (image left-justified in
				 * raster).
				 */
	int cr_nrows;		/* How deep the character grid is in rows. */
	short *cr_grid;		/* The 16-bit wide stripes for char,
				 * scanned from the top down, msb on the left.
				 */
};
