From: Dana Jansens Date: Thu, 29 May 2003 02:42:39 +0000 (+0000) Subject: i dunno wtf im doing anymore X-Git-Tag: gl2~39 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=76ec1883f194748e335614a355f6920cd06f511a;p=dana%2Fopenbox.git i dunno wtf im doing anymore --- diff --git a/glft/font.c b/glft/font.c index 27e9f092..a48f702d 100644 --- a/glft/font.c +++ b/glft/font.c @@ -257,12 +257,11 @@ struct GlftGlyph *GlftFontGlyph(struct GlftFont *font, const char *c) if (!(font->spacing == FC_PROPORTIONAL)) { g->width = font->max_advance_width; } else { - g->width = font->face->glyph->advance.x >> 6; + g->width = TRUNC(ROUND(font->face->glyph->metrics.horiAdvance)); } - g->x = font->face->glyph->metrics.horiBearingX >> 6; - g->y = font->face->glyph->metrics.horiBearingY >> 6; - g->height = TRUNC(ROUND(font->face->glyph->metrics.height));/* >> 6;*/ - g_message("%c = X %d Y %d Width: %d Height: %d", *c, g->x, g->y, g->width, g->height); + g->x = TRUNC(FLOOR(font->face->glyph->metrics.horiBearingX)); + g->y = TRUNC(CEIL(font->face->glyph->metrics.horiBearingY)); + g->height = TRUNC(ROUND(font->face->glyph->metrics.height)); g_hash_table_insert(font->glyph_map, &g->w, g); }