From: Dana Jansens Date: Tue, 3 Jun 2003 17:20:17 +0000 (+0000) Subject: fill in the font metrics api X-Git-Tag: gl-oldtheme~68 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=5eda58e2a80f388f9a275325f12c7a5ce16a9723;p=dana%2Fopenbox.git fill in the font metrics api --- diff --git a/render2/font.c b/render2/font.c index 3a21e16a..44ed5597 100644 --- a/render2/font.c +++ b/render2/font.c @@ -2,6 +2,7 @@ #include "instance.h" #include "font.h" #include +#include struct RrFont *RrFontOpen(struct RrInstance *inst, const char *fontstring) { @@ -23,7 +24,9 @@ void RrFontClose(struct RrFont *font) int RrFontMeasureString(struct RrFont *font, const char *string) { - return 20; + int w, h; + GlftMeasureString(font->font, string, strlen(string), &w, &h); + return w; } int RrFontHeight(struct RrFont *font) @@ -33,5 +36,5 @@ int RrFontHeight(struct RrFont *font) int RrFontMaxCharWidth(struct RrFont *font) { - return 5; + return GlftFontMaxCharWidth(font->font); }