added struct subsys so that we know each
[winnie] / src / text.cc
index 7f8c067..7dbae5d 100644 (file)
@@ -25,6 +25,7 @@ Author: Eleni Maria Stea <elene.mst@gmail.com>
 #include "gfx.h"
 #include "shalloc.h"
 #include "text.h"
+#include "winnie.h"
 
 #define DPI 72
 #define FONT_PATH "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf"
@@ -47,6 +48,8 @@ bool init_text()
                return false;
        }
 
+       get_subsys()->text_offset = (int)((char*)text - (char*)get_pool());
+
        if(FT_Init_FreeType(&text->ft_lib)) {
                fprintf(stderr, "Failed to initialize the FreeType library!\n");
                return false;