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
|
#ifndef __THAI_SHAPER_H__
#define __THAI_SHAPER_H__
typedef struct _ThaiFontInfo ThaiFontInfo;
/* Font encodings we will use
*/
typedef enum {
THAI_FONT_NONE,
THAI_FONT_TIS,
THAI_FONT_TIS_MAC,
THAI_FONT_TIS_WIN
} ThaiFontSet;
typedef enum {
THAI_FONTINFO_X,
THAI_FONTINFO_XFT
} ThaiFontInfoType;
struct _ThaiFontInfo
{
PangoFont *font;
ThaiFontSet font_set;
};
/*
* Abstract methods (implemented by each shaper module)
*/
ThaiFontInfo *
thai_get_font_info (PangoFont *font);
PangoGlyph
thai_get_glyph_tis (ThaiFontInfo *font_info, guchar c);
PangoGlyph
thai_make_glyph_tis (ThaiFontInfo *font_info, guchar c);
PangoGlyph
thai_get_glyph_uni (ThaiFontInfo *font_info, gunichar uc);
PangoGlyph
thai_make_glyph_uni (ThaiFontInfo *font_info, gunichar uc);
PangoGlyph
thai_make_unknown_glyph (ThaiFontInfo *font_info, gunichar uc);
/*
* Public functions
*/
void
thai_engine_shape (PangoEngineShape *engine,
PangoFont *font,
const char *text,
gint length,
PangoAnalysis *analysis,
PangoGlyphString *glyphs);
#endif /* __THAI_SHAPER_H__ */
|