aboutsummaryrefslogtreecommitdiff
path: root/include/freetype.h
diff options
context:
space:
mode:
authorbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
committerbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
commitb786f20bbab5a59046aa78a2c6c2a11536497202 (patch)
tree0851ecdec889eb9b7ba3751cc04d4f0b474e4a9e /include/freetype.h
inferno-os tree was separated from the inferno-os-android (separated from the Android driver)
Diffstat (limited to 'include/freetype.h')
-rw-r--r--include/freetype.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/freetype.h b/include/freetype.h
new file mode 100644
index 0000000..650eb1e
--- /dev/null
+++ b/include/freetype.h
@@ -0,0 +1,57 @@
+/*
+ * interface to libfreetype without recourse to the real freetype headers
+ * which would otherwise require full-blown CPP
+ */
+
+typedef struct FTfaceinfo FTfaceinfo;
+struct FTfaceinfo {
+ int nfaces;
+ int index;
+ int style;
+ int height;
+ int ascent;
+ char* familyname;
+ char* stylename;
+
+ long num_glyphs;
+};
+
+typedef struct FTface FTface;
+struct FTface {
+ void* ft_lib;
+ void* ft_face;
+};
+
+typedef struct FTglyph FTglyph;
+struct FTglyph {
+ int top;
+ int left;
+ int advx;
+ int advy;
+ int height;
+ int width;
+ int bpr;
+ uchar* bitmap;
+};
+
+typedef struct FTmatrix FTmatrix;
+struct FTmatrix {
+ int a;
+ int b;
+ int c;
+ int d;
+};
+
+typedef struct FTvector FTvector;
+struct FTvector {
+ int dx;
+ int dy;
+};
+
+extern char* ftnewface(char *, int, FTface*, FTfaceinfo*);
+extern char* ftloadmemface(void*, int, int, FTface*, FTfaceinfo*);
+extern char* ftsetcharsize(FTface, int, int, int, FTfaceinfo*);
+extern void ftsettransform(FTface, FTmatrix*, FTvector*);
+extern int fthaschar(FTface,int);
+extern char* ftloadglyph(FTface, int, FTglyph*);
+extern void ftdoneface(FTface);