#ifndef _text_h_ #define _text_h_ #include "fonts.h" #define FONTTYPE_NORMAL 0 #define FONTTYPE_BOLD 0x01 #define FONTTYPE_ITALIC 0x02 #define FONTTYPE_BOLDITALIC 0x03 #define FONTTYPE_PRE 0x04 #define FONTTYPE_ALL 5 typedef struct FontName { struct FontName *next; wchar_t head; XrmQuark foundry; XrmQuark name; /* font name */ int base_point; /* base point size */ } FontName, *FontNameList; FontName *fontname_new(void); void fontname_delete(FontName *p); void fontnamelist_delete(FontNameList l); typedef struct FontInfoTable { struct FontInfoTable *next; wchar_t head; FontInfo *fi; } FontInfoTable, *FontInfoTableList; typedef struct OCStat { wchar_t *str; int cur; int len; } OCStat; typedef struct OC { FontInfoTableList fitable; } OC; OC *oc_new(FontFaceTableList fftl, FontNameList fnl, int fonttype, double factor); void oc_delete(OC *oc); int WcDrawString(Display*, Drawable, OC*, GC, int, int, wchar_t*, int); int WcDrawImageString(Display*, Drawable, OC*, GC, int, int, wchar_t*, int); int WcTextEscapement(OC *, wchar_t *, int); void WcExtents(OC *oc, wchar_t *string, int length, XCharStruct *); int WcWidth(OC *oc, wchar_t wc); int gyomatsu_kinsoku(wchar_t wc); int gyoto_kinsoku(wchar_t wc); FontFaceTableList text_get_fftl(Display *dpy); #endif