[cairo-commit] cairo/src cairo-scaled-font.c,1.9,1.10

Carl Worth commit at pdx.freedesktop.org
Fri Jan 20 14:48:09 PST 2006


Committed by: cworth

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

Modified Files:
	cairo-scaled-font.c 
Log Message:

2006-01-20  Carl Worth  <cworth at cworth.org>

        * src/cairo-scaled-font.c: (cairo_scaled_font_create): Check
        font_face->status and return a nil scaled font if it is in an
        error state. (Thanks to Christian Biesinger and sunmoon1997 who
        pointed this out as part of bug #4674).

        With this bug fix, the ft-font-create-for-ft-face test fails (as
        it should) since it is abusing fontconfig.


Index: cairo-scaled-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-scaled-font.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo-scaled-font.c	16 Dec 2005 11:02:35 -0000	1.9
+++ cairo-scaled-font.c	20 Jan 2006 22:48:07 -0000	1.10
@@ -405,6 +405,9 @@
     cairo_scaled_font_map_t *font_map;
     cairo_scaled_font_t key, *scaled_font = NULL;
 
+    if (font_face->status)
+	return (cairo_scaled_font_t *)&_cairo_scaled_font_nil;
+
     font_map = _cairo_scaled_font_map_lock ();
     if (font_map == NULL)
 	goto UNWIND;



More information about the cairo-commit mailing list