[cairo-commit] cairo/src cairo_ft_font.c,1.35,1.36

Carl Worth commit at pdx.freedesktop.org
Tue Jan 25 11:49:01 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv2183/src

Modified Files:
	cairo_ft_font.c 
Log Message:

        * src/cairo_ft_font.c (_cairo_ft_font_show_glyphs): Fixed rounding
        of glyph positioning.


Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cairo_ft_font.c	23 Jan 2005 23:17:05 -0000	1.35
+++ cairo_ft_font.c	25 Jan 2005 19:48:59 -0000	1.36
@@ -1012,7 +1012,7 @@
     cairo_ft_font_t *font = abstract_font;
     cairo_status_t status;
 
-    double x, y;
+    int x, y;
     int i;
 
     _cairo_lock_global_image_glyph_cache ();
@@ -1042,8 +1042,8 @@
 	    || img->image == NULL)
 	    continue;
    
-	x = glyphs[i].x;
-	y = glyphs[i].y;
+	x = (int) floor (glyphs[i].x + 0.5);
+	y = (int) floor (glyphs[i].y + 0.5);
 
 	status = _cairo_surface_composite (operator, source, 
 					   &(img->image->base), 




More information about the cairo-commit mailing list