diff --git a/ChangeLog b/ChangeLog index f708f226b..2d614264d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-02-24 Owen Taylor + + * src/cairo_win32_surface.c (_cairo_win32_surface_destroy): + When we created a DC/bitmap pair, delete the DC before + the Bitmap so that the Bitmap will be released from the + DC and can be destroyed. (Reported by Hans Breuer) + + * configure.in cairo.pc.in: Only require fontconfig + if building FreeType font backend. + + * configure.in: Fix output when reporting Win32 font backend. + 2005-02-24 Carl Worth * TODO: Remove many TODO items that have now been absorbed by the diff --git a/cairo.pc.in b/cairo.pc.in index 4e420b202..2cd0ff182 100644 --- a/cairo.pc.in +++ b/cairo.pc.in @@ -7,6 +7,6 @@ Name: cairo Description: Multi-platform 2D graphics library Version: @VERSION@ -Requires: fontconfig libpixman @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@ +Requires: @FREETYPE_REQUIRES@ libpixman @XRENDER_REQUIRES@ @PNG_REQUIRES@ @GLITZ_REQUIRES@ Libs: @FREETYPE_LIBS@ -L${libdir} -lcairo Cflags: @FREETYPE_CFLAGS@ -I${includedir}/cairo diff --git a/configure.in b/configure.in index 1293c349a..1835f9bed 100644 --- a/configure.in +++ b/configure.in @@ -323,9 +323,11 @@ if test "x$use_freetype" = "xyes"; then AC_MSG_RESULT($FREETYPE_VERSION - OK) FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags` - FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` + FREETYPE_LIBS=`$FREETYPE_CONFIG --libs` + FREETYPE_REQUIRES=fontconfig AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) + AC_SUBST(FREETYPE_REQUIRES) fi CAIRO_CFLAGS="$CAIRO_CFLAGS $FREETYPE_CFLAGS" @@ -438,7 +440,7 @@ echo " glitz: $use_glitz" echo "" echo "and the following font backends:" echo " FreeType: $use_freetype" -echo " Win32: false" +echo " Win32: $use_win32" echo " ATSUI: $use_atsui" echo "" diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c index 6c1e36a22..4f1b09516 100644 --- a/src/cairo-win32-surface.c +++ b/src/cairo-win32-surface.c @@ -240,12 +240,12 @@ _create_dc_and_bitmap (HDC original_dc, if (bitmap_info && num_palette > 2) free (bitmap_info); - if (bitmap) - DeleteObject (bitmap); - if (dc) DeleteDC (dc); + if (bitmap) + DeleteObject (bitmap); + return status; } @@ -350,8 +350,10 @@ _cairo_win32_surface_destroy (void *abstract_surface) if (surface->saved_clip) DeleteObject (surface->saved_clip); - if (surface->bitmap) + if (surface->bitmap) { + DeleteDC (surface->dc); DeleteObject (surface->bitmap); + } free (surface); } diff --git a/src/cairo_win32_surface.c b/src/cairo_win32_surface.c index 6c1e36a22..4f1b09516 100644 --- a/src/cairo_win32_surface.c +++ b/src/cairo_win32_surface.c @@ -240,12 +240,12 @@ _create_dc_and_bitmap (HDC original_dc, if (bitmap_info && num_palette > 2) free (bitmap_info); - if (bitmap) - DeleteObject (bitmap); - if (dc) DeleteDC (dc); + if (bitmap) + DeleteObject (bitmap); + return status; } @@ -350,8 +350,10 @@ _cairo_win32_surface_destroy (void *abstract_surface) if (surface->saved_clip) DeleteObject (surface->saved_clip); - if (surface->bitmap) + if (surface->bitmap) { + DeleteDC (surface->dc); DeleteObject (surface->bitmap); + } free (surface); }