init.lo
debug.lo
color.lo
+font.lo
rendertest_SOURCES=test.c
lib_LTLIBRARIES=libobrender2.la
-libobrender2_la_SOURCES=init.c instance.c color.c debug.c
+libobrender2_la_SOURCES=init.c instance.c color.c debug.c font.c
noinst_HEADERS=render.h instance.h debug.h
--- /dev/null
+#include "render.h"
+#include "font.h"
+#include <stdlib.h>
+
+struct RrFont *RrFontOpen(struct RrInstance *inst, const char *fontstring)
+{
+ struct RrFont *font;
+
+ font = malloc(sizeof(struct RrFont));
+ font->inst = inst;
+/*XXX font->font = GlftFontOpen(fontstring);*/
+ return font;
+}
+
+void RrFontClose(struct RrFont *font)
+{
+ if (font) {
+/*XXX GlftFontClose(font->font);*/
+ free(font);
+ }
+}
+
+int RrFontMeasureString(struct RrFont *font, const char *string)
+{
+ return 20;
+}
+
+int RrFontHeight(struct RrFont *font)
+{
+ return 8;
+}
+
+int RrFontMaxCharWidth(struct RrFont *font)
+{
+ return 5;
+}
#include "glft/glft.h"
+struct RrInstance;
+
struct RrFont {
+ struct RrInstance *inst;
struct GlftFont *font;
};
struct RrFont;
+struct RrFont *RrFontOpen(struct RrInstance *inst, const char *fontstring);
+void RrFontClose(struct RrFont *font);
+
+int RrFontMeasureString(struct RrFont *font, const char *string);
+int RrFontHeight(struct RrFont *font);
+int RrFontMaxCharWidth(struct RrFont *font);
+
#endif