-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdat.h
More file actions
74 lines (60 loc) · 1.43 KB
/
Copy pathdat.h
File metadata and controls
74 lines (60 loc) · 1.43 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
typedef struct XFont XFont;
enum {
SubfontSize = 32,
MaxSubfont = (Runemax+1)/SubfontSize,
};
struct XFont
{
char *name;
int loaded;
uchar range[MaxSubfont]; // range[i] = fontfile starting at i*SubfontSize exists
ushort file[MaxSubfont]; // file[i] == fontfile i's lo rune / SubfontSize
int nfile;
int unit;
double height;
double originy;
void (*loadheight)(XFont*, int, int*, int*);
char *fonttext;
int nfonttext;
// fontconfig workarround, as FC_FULLNAME does not work for matching fonts.
char *fontfile;
int index;
};
void loadfonts(void);
void load(XFont*);
Memsubfont* mksubfont(XFont*, char*, int, int, int, int);
void *emalloc9p(ulong);
void drawpjw(Memimage*, Fontchar*, int, int, int, int);
extern XFont *xfont;
extern int nxfont;
// FontConfig-like API
typedef struct FcConfig FcConfig;
typedef struct FcFontSet FcFontSet;
typedef struct FcPattern FcPattern;
typedef char FcChar8;
struct FcConfig {
void* aux;
};
struct FcFontSet {
int nfont;
FcPattern** fonts;
};
struct FcPattern {
// access through FcPatternGetString, FcPatternGetInteger
int index;
char* name;
char* fontfile;
};
enum {
FcSetSystem,
FcResultMatch,
FC_POSTSCRIPT_NAME,
FC_FILE,
FC_INDEX,
};
int FcInit(void);
FcConfig* FcInitLoadConfigAndFonts(void);
void FcFontSetDestroy(FcFontSet*);
FcFontSet* FcConfigGetFonts(FcConfig*, int);
int FcPatternGetString(FcPattern*, int, int, FcChar8**);
int FcPatternGetInteger(FcPattern*, int, int, int*);