layout better with shadows
authorDana Jansens <danakj@orodu.net>
Wed, 4 Jun 2003 22:24:11 +0000 (22:24 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 4 Jun 2003 22:24:11 +0000 (22:24 +0000)
glft/render.c

index d57a7e74a4db70fa8a571daa9d8928209df54e66..3f85a89d9d7e517f43288b68ba245b32c4430202 100644 (file)
@@ -99,7 +99,6 @@ void GlftRenderString(struct GlftFont *font, const char *str, int bytes,
         return;
     }
 
-    drawstring(font, str, bytes, color, x, y);
     if (font->shadow && font->shadow_alpha != 0) {
         struct GlftColor c;
         if (font->shadow_alpha > 0) {
@@ -110,8 +109,10 @@ void GlftRenderString(struct GlftFont *font, const char *str, int bytes,
             c.a = -font->shadow_alpha;
         }
         drawstring(font, str, bytes, &c,
-                   x + font->shadow_offset, y + font->shadow_offset);
+                   x + font->shadow_offset, y);
+        y += font->shadow_offset;
     }
+    drawstring(font, str, bytes, color, x, y);
 }
 
 void GlftMeasureString(struct GlftFont *font,