AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

FONT ( 4 ) (AT&T UNIX PC only ) FONT ( 4) NAME font - font file format DESCRIPTION A font is a collection of 96 variably-sized graphics. A font exists first on disk as a "font file." Font files are loaded into the kernel via the WIOCLFONT (see window(1)) or SYSL_LFONT (see syslocal(2)) ioctl . Each font file has three sections: first, a header containing information about the font as a whole; second, a 96entry table describing each of up to 96 characters in the font; and third, a variable number of "minirasters," each an array of 16-bit words containing the pixel definition of each character. The font file format is given below: #define FMAGIC 0616 #define FNTSIZE 96 struct fntdef { long unsigned char char char char char struct f cdef unsigned short }; }; /* font magic number *I /* size of a font *I ff_magic; ff_flags; ff_hs; ff_vs; ff_baseline; ff_dummy [ 26] ; ff_fc[FNTSIZE]; ff_raster; j* magic number *I /* flags *I /* hor spacing *I I* ver spacing *I /* baseline *I /* padding *I I* char defs *I /* minirasters *I struct fcdef I* font character definition *I { char char char char char char short fc_hs; fc_vs; fc_ha; fc_va; fc_hi; fc_vi; fc_mr; /* horiwntal size in bits *I /* vertical size *I I* horizontal adjust (signed) *I I* vertical adjust (signed) *I I* horizontal increment * I /* vertical increment *I /* relative mini-raster pointer *I Each mini-raster is dealt with as 16-bit words; hence it must be word-aligned, and consist of fc_hs raster lines each of which contains an integral number of 16-bit data words. The actual position of upper-left corner of miniraster is ( curx + fc_ha, cury + fc_va ) . Every word of mini-raster information is stored HIGH byte first, a Ia mc68000. The low order bit of the first word is the leftmost raster point. Bit-0 of the first word thus corresponds to the upper- left corner of the character. The actual bit pattern of a character is flush left in its mini-raster. The bits to the right of the pattern (i.e. to the right of fc_hs ) and before the short boundary must be 0. Normally, fc_va is negative, thus implying that coordinate (0, 0) is upper left. - 1 -

FONT ( 4 ) (AT&T UNIX PC only ) FONT ( 4)<br />

NAME<br />

font - font file format<br />

DESCRIPTION<br />

A font is a collection of 96 variably-sized graphics. A font exists<br />

first on disk as a "font file." Font files are loaded into the kernel<br />

via the WIOCLFONT (see window(1)) or SYSL_LFONT (see syslocal(2))<br />

ioctl . Each font file has three sections: first, a header<br />

containing information about the font as a whole; second, a 96entry<br />

table describing each of up to 96 characters in the font; and<br />

third, a variable number of "minirasters," each an array of 16-bit<br />

words containing the pixel definition of each character. The font<br />

file format is given below:<br />

#define FMAGIC 0616<br />

#define FNTSIZE 96<br />

struct fntdef<br />

{<br />

long<br />

unsigned char<br />

char<br />

char<br />

char<br />

char<br />

struct f cdef<br />

unsigned short<br />

};<br />

};<br />

/* font magic number *I<br />

/* size of a font *I<br />

ff_magic;<br />

ff_flags;<br />

ff_hs;<br />

ff_vs;<br />

ff_baseline;<br />

ff_dummy [ 26] ;<br />

ff_fc[FNTSIZE];<br />

ff_raster;<br />

j* magic number *I<br />

/* flags *I<br />

/* hor spacing *I<br />

I* ver spacing *I<br />

/* baseline *I<br />

/* padding *I<br />

I* char defs *I<br />

/* minirasters *I<br />

struct fcdef I* font character definition *I<br />

{<br />

char<br />

char<br />

char<br />

char<br />

char<br />

char<br />

short<br />

fc_hs;<br />

fc_vs;<br />

fc_ha;<br />

fc_va;<br />

fc_hi;<br />

fc_vi;<br />

fc_mr;<br />

/* horiwntal size in bits *I<br />

/* vertical size *I<br />

I* horizontal adjust (signed) *I<br />

I* vertical adjust (signed) *I<br />

I* horizontal increment * I<br />

/* vertical increment *I<br />

/* relative mini-raster pointer *I<br />

Each mini-raster is dealt with as 16-bit words; hence it must be<br />

word-aligned, and consist of fc_hs raster lines each of which contains<br />

an integral number of 16-bit data words. The actual position<br />

of upper-left corner of miniraster is ( curx + fc_ha, cury + fc_va<br />

) . Every word of mini-raster information is stored HIGH byte<br />

first, a Ia mc68000. The low order bit of the first word is the leftmost<br />

raster point. Bit-0 of the first word thus corresponds to the<br />

upper- left corner of the character.<br />

The actual bit pattern of a character is flush left in its mini-raster.<br />

The bits to the right of the pattern (i.e. to the right of fc_hs ) and<br />

before the short boundary must be 0. Normally, fc_va is negative,<br />

thus implying that coordinate (0, 0) is upper left.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!