summaryrefslogtreecommitdiff
path: root/render/font.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-17 07:30:30 +0000
committerDana Jansens <danakj@orodu.net>2003-03-17 07:30:30 +0000
commit0c2f95674f56e25e2b74cce506d9d89ec41252a4 (patch)
treeba4ce4035b1e6233c6db85434d695d2e3ef86709 /render/font.c
parent6abd9fe80192a2a19b563f20302412520e13b57d (diff)
pass the x,y,w,h to font_draw.
draw the text in the "right" place for now.. no justification yet
Diffstat (limited to 'render/font.c')
-rw-r--r--render/font.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/render/font.c b/render/font.c
index 67fd1b7d..b92bafb1 100644
--- a/render/font.c
+++ b/render/font.c
@@ -90,10 +90,15 @@ int font_max_char_width(ObFont *f)
return (signed) f->xftfont->max_advance_width;
}
-void font_draw(XftDraw *d, TextureText *t)
+void font_draw(XftDraw *d, TextureText *t, int x, int y, int w, int h)
{
- int x = 0, y = 0;
XftColor c;
+
+ /* accomidate for areas bigger/smaller than Xft thinks the font is tall */
+ y += (h - t->font->xftfont->height) / 2;
+
+ x += 3; /* XXX figure out X with justification */
+
if (t->shadow) {
c.color.red = 0;
c.color.green = 0;