xref: /inferno-os/include/freetype.h (revision 37da2899f40661e3e9631e497da8dc59b971cbd0)
1 /*
2  * interface to libfreetype without recourse to the real freetype headers
3  * which would otherwise require full-blown CPP
4  */
5 
6 typedef struct FTfaceinfo FTfaceinfo;
7 struct FTfaceinfo {
8 	int	nfaces;
9 	int	index;
10 	int	style;
11 	int	height;
12 	int	ascent;
13 	char*	familyname;
14 	char*	stylename;
15 };
16 
17 typedef struct FTface FTface;
18 struct FTface {
19 	void*	ft_lib;
20 	void*	ft_face;
21 };
22 
23 typedef struct FTglyph FTglyph;
24 struct FTglyph {
25 	int	top;
26 	int	left;
27 	int	advx;
28 	int	advy;
29 	int	height;
30 	int	width;
31 	int	bpr;
32 	uchar*	bitmap;
33 };
34 
35 typedef struct FTmatrix FTmatrix;
36 struct FTmatrix {
37 	int	a;
38 	int	b;
39 	int	c;
40 	int	d;
41 };
42 
43 typedef struct FTvector FTvector;
44 struct FTvector {
45 	int	dx;
46 	int	dy;
47 };
48 
49 extern	char*	ftnewface(char *, int, FTface*, FTfaceinfo*);
50 extern	char*	ftloadmemface(void*, int, int, FTface*, FTfaceinfo*);
51 extern	char*	ftsetcharsize(FTface, int, int, int, FTfaceinfo*);
52 extern	void		ftsettransform(FTface, FTmatrix*, FTvector*);
53 extern	int		fthaschar(FTface,int);
54 extern	char*	ftloadglyph(FTface, int, FTglyph*);
55 extern	void		ftdoneface(FTface);
56