#include <freetype/freetype.h>
#include "gfx.h"
+#include "shalloc.h"
#include "text.h"
#define DPI 72
bool init_text()
{
- if(!(text = (Text*)malloc(sizeof *text))) {
+ if(!(text = (Text*)sh_malloc(sizeof *text))) {
return false;
}
return true;
}
+void destroy_text()
+{
+ sh_free(text);
+}
+
void draw_text(const char *txt, Pixmap *pixmap)
{
if(!pixmap) {