i dunno wtf im doing anymore
authorDana Jansens <danakj@orodu.net>
Thu, 29 May 2003 02:42:39 +0000 (02:42 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 29 May 2003 02:42:39 +0000 (02:42 +0000)
glft/font.c

index 27e9f0929b74c3b1fd9b41ccbea296808d1e11d5..a48f702d8ed24907be3f97d2dffd714d40a6f49a 100644 (file)
@@ -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);
     }