okular/font.h
Stefan Kebekus 8fecec6076 source code cleanup
svn path=/trunk/kdegraphics/kdvi/; revision=50043
2000-05-20 05:10:06 +00:00

44 lines
1.7 KiB
C

/*
* The layout of a font information block.
* There is one of these for every loaded font or magnification thereof.
* Duplicates are eliminated: this is necessary because of possible recursion
* in virtual fonts.
*
* Also note the strange units. The design size is in 1/2^20 point
* units (also called micro-points), and the individual character widths
* are in the TFM file in 1/2^20 ems units, i.e., relative to the design size.
*
* We then change the sizes to SPELL units (unshrunk pixel / 2^16).
*/
#include <stdio.h>
#define NOMAGSTP (-29999)
typedef void (*read_char_proc)(register struct font *, unsigned int);
struct font {
struct font *next; /* link to next font info block */
char *fontname; /* name of font */
float fsize; /* size information (dots per inch) */
int magstepval; /* magstep number * two, or NOMAGSTP */
FILE *file; /* open font file or NULL */
char *filename; /* name of font file */
long checksum; /* checksum */
unsigned short timestamp; /* for LRU management of fonts */
unsigned char flags; /* flags byte (see values below) */
unsigned char maxchar; /* largest character code */
double dimconv; /* size conversion factor */
set_char_proc set_char_p; /* proc used to set char */
/* these fields are used by (loaded) raster fonts */
read_char_proc read_char; /* function to read bitmap */
struct glyph *glyph;
/* these fields are used by (loaded) virtual fonts */
struct font **vf_table; /* list of fonts used by this vf */
struct tn *vf_chain; /* ditto, if TeXnumber >= VFTABLELEN */
struct font *first_font; /* first font defined */
struct macro *macro;
/* I suppose the above could be put into a union, but we */
/* wouldn't save all that much space. */
};