-/* doc.AddBezierData(Bezier(0,0,0,1,1,0));
- doc.AddBezierData(Bezier(0,0,1,0,0,1));
- doc.AddBezierData(Bezier(0,0,1,1,1,0));
- doc.AddBezierData(Bezier(0,1,1,0,0,1));*/
-
- stbtt_fontinfo font;
- FILE *font_file = fopen("DejaVuSansMono.ttf", "rb");
- fseek(font_file, 0, SEEK_END);
- size_t font_file_size = ftell(font_file);
- fseek(font_file, 0, SEEK_SET);
- unsigned char *font_file_data = (unsigned char*)malloc(font_file_size);
- SDL_assert(fread(font_file_data, 1, font_file_size, font_file) == font_file_size);
- fclose(font_file);
- stbtt_InitFont(&font, font_file_data, 0);
+ doc.AddText(input_text, bounds.h/Real(2), bounds.x, bounds.y+bounds.h/Real(2));
+ }
+ else
+ {
+ doc.Add(RECT_OUTLINE, Rect(0,0,0,0),0); // hack to stop segfault if document is empty (:S)
+ }