Blob


1 typedef struct XFont XFont;
2 XFont *xfont;
3 int nxfont;
5 enum {
6 SubfontSize = 32,
7 SubfontMask = (1<<16)/SubfontSize - 1,
8 };
10 struct XFont
11 {
12 char *name;
13 int loaded;
14 uchar range[(1<<16)/SubfontSize]; // range[i] == whether to have subfont i*SubfontSize to (i+1)*SubfontSize - 1.
15 int nrange;
16 int unit;
17 double height;
18 double originy;
19 void (*loadheight)(XFont*, int, int*, int*);
21 // fontconfig workarround, as FC_FULLNAME does not work for matching fonts.
22 char *fontfile;
23 int index;
24 };
26 void loadfonts(void);
27 void load(XFont*);
28 Memsubfont* mksubfont(XFont*, char*, int, int, int, int);
30 extern XFont *xfont;
31 extern int nxfont;
32 void *emalloc9p(ulong);
34 void drawpjw(Memimage*, Fontchar*, int, int, int, int);