summaryrefslogtreecommitdiff
path: root/fscalc.h
diff options
context:
space:
mode:
Diffstat (limited to 'fscalc.h')
-rw-r--r--fscalc.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/fscalc.h b/fscalc.h
new file mode 100644
index 0000000..5046b8f
--- /dev/null
+++ b/fscalc.h
@@ -0,0 +1,24 @@
+#ifndef _FSCALC_H_
+#define _FSCALC_H_
+
+#include <string>
+#include <fontconfig/fontconfig.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H
+
+class Font {
+ FcConfig *fc;
+ FcPattern *aux;
+ FT_Library library;
+ FT_Face face;
+ public:
+ Font(std::string, int, int);
+ ~Font();
+ void set_font_size(int);
+ double get_kerning(FT_UInt, FT_UInt);
+ unsigned int get_text_width(std::string);
+ unsigned int get_line_height();
+};
+
+#endif