libi3: Rework font to support multiple backends

This commit is contained in:
Fernando Tarlá Cardoso Lemos
2011-11-14 21:39:03 -02:00
committed by Quentin Glidic
parent edd9007ebf
commit ec17a26b0e
4 changed files with 125 additions and 51 deletions

View File

@ -33,17 +33,28 @@ typedef struct Font i3Font;
*
*/
struct Font {
/** The xcb-id for the font */
xcb_font_t id;
/** Font information gathered from the server */
xcb_query_font_reply_t *info;
/** Font table for this font (may be NULL) */
xcb_charinfo_t *table;
/** The type of font */
enum {
FONT_TYPE_NONE = 0,
FONT_TYPE_XCB,
FONT_TYPE_PANGO
} type;
/** The height of the font, built from font_ascent + font_descent */
int height;
union {
struct {
/** The xcb-id for the font */
xcb_font_t id;
/** Font information gathered from the server */
xcb_query_font_reply_t *info;
/** Font table for this font (may be NULL) */
xcb_charinfo_t *table;
} xcb;
} specific;
};
/* Since this file also gets included by utilities which dont use the i3 log