1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
/* -*- c-basic-offset:2; tab-width:2; indent-tabs-mode:nil -*- */
#ifndef __UI_FONT_CACHE_H__
#define __UI_FONT_CACHE_H__
#include "ui.h"
#include <pobl/bl_map.h>
#include <pobl/bl_types.h>
#include <mef/ef_charset.h>
#include "ui_font_config.h"
BL_MAP_TYPEDEF(ui_font, vt_font_t, ui_font_t *);
typedef struct ui_font_cache {
/*
* Public(readonly)
*/
Display *display;
u_int font_size;
ef_charset_t usascii_font_cs;
ui_font_config_t *font_config;
int letter_space;
ui_font_t *usascii_font;
/*
* Private
*/
BL_MAP(ui_font) uifont_table;
struct {
vt_font_t font;
ui_font_t *uifont;
} prev_cache;
u_int ref_count;
} ui_font_cache_t;
void ui_set_use_leftward_double_drawing(int use);
void ui_compose_dec_special_font(void);
ui_font_cache_t *ui_acquire_font_cache(Display *display, u_int font_size,
ef_charset_t usascii_font_cs, ui_font_config_t *font_config,
int letter_space);
void ui_release_font_cache(ui_font_cache_t *font_cache);
void ui_font_cache_unload(ui_font_cache_t *font_cache);
void ui_font_cache_unload_all(void);
ui_font_t *ui_font_cache_get_font(ui_font_cache_t *font_cache, vt_font_t font);
XFontSet ui_font_cache_get_fontset(ui_font_cache_t *font_cache);
#endif
|