]> icculus.org git repositories - dana/openbox.git/blob - render2/font.c
the kernel is using th gl shit to render itself, but with the old style frame shit...
[dana/openbox.git] / render2 / font.c
1 #include "render.h"
2 #include "instance.h"
3 #include "font.h"
4 #include <stdlib.h>
5
6 struct RrFont *RrFontOpen(struct RrInstance *inst, const char *fontstring)
7 {
8     struct RrFont *font;
9
10     font = malloc(sizeof(struct RrFont));
11     font->inst = inst;
12     font->font = GlftFontOpen(RrDisplay(inst), RrScreen(inst), fontstring);
13     return font;
14 }
15
16 void RrFontClose(struct RrFont *font)
17 {
18     if (font) {
19         GlftFontClose(font->font);
20         free(font);
21     }
22 }
23
24 int RrFontMeasureString(struct RrFont *font, const char *string)
25 {
26     return 20;
27 }
28
29 int RrFontHeight(struct RrFont *font)
30 {
31     return GlftFontHeight(font->font);
32 }
33
34 int RrFontMaxCharWidth(struct RrFont *font)
35 {
36     return 5;
37 }