|
|
1.1 ! root 1: .ds ZZ DEVELOPMENT PACKAGE ! 2: .TH FONT 4 "630 MTG" ! 3: .XE "font" ! 4: .SH NAME ! 5: font \- font file format ! 6: .SH DESCRIPTION ! 7: A font file is a file containing a description of a Font that ! 8: can be read by ! 9: .I infont(3R/3L) ! 10: or ! 11: .I loadfont(1) ! 12: and converted into a Font in the terminal. ! 13: A font file can be created by using ! 14: .IR outfont . ! 15: .PP ! 16: A font file begins with a structure that is similar to a Font. ! 17: It looks like the following: ! 18: .nf ! 19: struct Fontheader { ! 20: short n; /* number of chars in font */ ! 21: char height; /* height of bitmap */ ! 22: char ascent; /* top of bitmap to baseline */ ! 23: long unused; /* in case we think of more stuff */ ! 24: Fontchar info[1]; /* n+1 character descriptors */ ! 25: } ! 26: .fi ! 27: ! 28: The fields in this structure have the same meanings as the ones in the ! 29: Font structure. There are really ! 30: .IR n +1 ! 31: Fontchar structures in the info array. The only field that ! 32: contains valid data in the [n+1]th element is \f2x\f1; the leftmost ! 33: edge of the corresponding cell in the bitmap. ! 34: Each Fontchar structure starts on a long integer boundary and is padded with ! 35: null characters to the next long integer boundary and the start of the ! 36: next Fontchar structure. ! 37: Therefore, there are two nulls after each of the ! 38: .IR n + 1 ! 39: Fontchars in the file. ! 40: .PP ! 41: Following this in the file is the bitmap image of the font. ! 42: This is an array holding the bit image of all the characters ! 43: in the font. It corresponds to ! 44: .I bits->base ! 45: in the Font structure. ! 46: Its size is defined as: ! 47: ! 48: char base[ ! 49: .I height ! 50: ][ ! 51: .RI (( info [ ! 52: .IR n +1 ! 53: ].x+31)/32)\(**4 ] ! 54: ! 55: The last column of bits used by a font is ! 56: .IR info [ n +1].x-1. ! 57: The width is rounded up to the nearest long integer boundary for the bitmap image. ! 58: .SH SEE ALSO ! 59: infont(3L), loadfont(1), structures(3R).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.