#ifndef _font_h_ #define _font_h_ #include #include #include #include struct FontFace; /* font instance data */ typedef struct FontInfo { struct FontInfo *next; struct FontFace *parent; int point; /* point size (x10) */ int count; /* reference count */ XFontStruct *fs; /* X font structure */ } FontInfo; /* all font data list of the encoding */ typedef struct FontFace { struct FontFace *next; Display *dpy; XrmQuark foundry; XrmQuark name; /* font name */ XrmQuark weight; /* medium, demibold, bold, black */ XrmQuark slant; /* r, i */ XrmQuark spacing; /* m, c, p */ XrmQuark encoding; /* encoding name */ FontInfo *points; /* font information each point size */ int scale_ok; /* scaling ok */ int scalable; /* true scalable font */ } FontFace, *FontFaceList; typedef struct FontEncodeTable { wchar_t head; char *encoding; char *encoding2; char *encoding3; } FontEncodeTable; typedef struct FontFaceTable { struct FontFaceTable *next; wchar_t head; FontFaceList faces; } FontFaceTable, *FontFaceTableList; FontFaceList GetFontFaces(Display *dpy, char *encoding); FontFaceTableList MakeFontFaceTable(Display *dpy, FontEncodeTable *tbl); FontFace* FindFontFace(FontFaceList faces, XrmQuark foundry, XrmQuark name, XrmQuark weight, XrmQuark slant, XrmQuark spacing, int scale_ok); FontInfo* FindFontInfo(FontFace *fi, int point, int scale_ok); #endif