summaryrefslogtreecommitdiff
path: root/src/text.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.cc')
-rw-r--r--src/text.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/text.cc b/src/text.cc
new file mode 100644
index 0000000..cf5345d
--- /dev/null
+++ b/src/text.cc
@@ -0,0 +1,11 @@
+#include "text.h"
+
+enum font_context_error_e wayc_font_context_init(struct font_context_s* ctx) {
+ FT_Error err = FT_Init_FreeType(&ctx->library);
+ if (err) return FONT_CONTEXT_ERROR_LIBRARY;
+ return FONT_CONTEXT_ERROR_NONE;
+}
+
+void wayc_font_context_deinit(struct font_context_s* ctx) {
+ FT_Done_FreeType(ctx->library);
+} \ No newline at end of file