[AD] xf2pcx

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I committed this very minor fix, to allow fonts with missing characters.

-- 
Elias Pschernig
Index: xf2pcx.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tools/x11/xf2pcx.c,v
retrieving revision 1.4
diff -u -p -r1.4 xf2pcx.c
--- xf2pcx.c	23 Jun 2003 08:35:36 -0000	1.4
+++ xf2pcx.c	4 Sep 2004 13:07:21 -0000
@@ -252,11 +252,14 @@ int main(int argc, char *argv[])
 	 XQueryTextExtents16(display, font, string, 1, &dir, &ascent,
 			     &descent, &overall);
 
+	 if (overall.width < 1)
+	    overall.width = 1;
+
 	 /* create pixmap and draw character there */
 	 pixmap =
 	     XCreatePixmap(display, window, overall.width, max_height,
 			   default_depth);
-	 /* some fonts draw outside there ascent/descent, so we need to clear
+	 /* some fonts draw outside their ascent/descent, so we need to clear
 	  * the pixmap before drawing the glyph */
 	 XFillRectangle(display, pixmap, gc2, 0, 0, overall.width,
 			max_height);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/