[cairo] [cairo-announce] cairo snapshot 1.3.16 (1.4.0 release candidate) now available

Behdad Esfahbod behdad at behdad.org
Fri Mar 2 21:38:00 PST 2007

A new cairo snapshot 1.3.16 is now available from:


    which can be verified with:

        8c80376b18a58727f03fea05ef191acb19903e01  cairo-1.3.16.tar.gz

        (signed by Behdad Esfahbod)

  Additionally, a git clone of the source tree:

        git clone git://git.cairographics.org/git/cairo

    will include a signed 1.3.16 tag which points to a commit named:

    which can be verified with:
        git verify-tag 1.3.16

    and can be checked out with a command such as:
        git checkout -b build 1.3.16

This is the eighth development snapshot in the 1.3 series, and the
release candidate for 1.4.0, that will be released early next week.
It comes just over 3 weeks after the 1.3.14 snapshot.

New API functions
A few new public functions have been added to the cairo API since the
1.3.14 snapshot. These include a function to query the current scaled


New functions to query the reference count of all cairo objects:




And new functions to allow the use of user_data with any cairo object,
(previously these were only available on cairo_surface_t and
cairo_font_face_t objects):




Usability improvement for PDF/PS/SVG generation
In previous versions of cairo, generating single-page output with the
cairo-pdf, cairo-ps, or cairo-svg backends required a final call to
cairo_show_page. This was often quite confusing as people would port
functional code from a non-paginated backend and be totally mystified
as to why the output was blank until they learned to add this call.

Now that call to cairo_show_page is optional, (it will be generated
implicitly if the user does not call it). So cairo_show_page is only
needed to explicitly separate multiple pages.

Greatly improved PDF output
We are very happy to be able to announce that cairo-generated PDF
output will now have text that can be selected, cut-and-paste, and
searched with most capable PDF viewer applications. This is something
that was not ever possible with cairo 1.2.

Also, the PDF output now has much more compact encoding of text than
before. Cairo is now much more careful to not embed multiple copies of
the same font at different sizes. It also compresses text and font
streams within the PDF output.

Major bug fixes
  • Fixed radial gradients

    The rendering of radial gradients has been greatly improved. In
    the cairo 1.2 series, there was a serious regression affecting
    radial gradients---results would be very incorrect unless one of
    the gradient circles had a radius of 0.0 and a center point within
    the other circle. These bugs have now been fixed.

  • Fixed dashing

    Several fixes have been made to the implementation of dashed
    stroking. Previously, some dashed, stroked rectangles would
    mis-render and fill half of the rectangle with a large triangular
    shape. This bug has now been fixed.

  • Fixed transformed images in PDF/PS output

    In previous versions of cairo, painting with an image-based source
    surface pattern to the PDF or PS backends would cause many kinds
    of incorrect results. One of the most common problems was that an
    image would be repeated many times even when the user had
    explicitly requested no repetition with CAIRO_EXTEND_NONE. These
    bugs have now been fixed.

  • Eliminate errors from CAIRO_EXTEND_REFLECT and CAIRO_EXTEND_PAD

    In the 1.2 version of cairo any use of CAIRO_EXTEND_REFLECT or
    CAIRO_EXTEND_PAD with a surface-based pattern resulted in an
    error, (cairo would stop rendering). This bug has now been

    Now, CAIRO_EXTEND_REFLECT should work properly with surface

    CAIRO_EXTEND_PAD is still not working correctly, but it will now
    simply behave as CAIRO_EXTEND_NONE rather than triggering the

New rewrite of quartz backend (still experimental)
Cairo's quartz backend has been entirely rewritten and is now much
more efficient. This backend is still marked as experimental, not
supported, but it is now much closer to becoming an officially
supported backend. (For people that used the experimental nquartz
backend in previous snapshots, that implementation has now been
renamed from "nquartz" to "quartz" and has replaced the old quartz

Documentation improvements
We have added documentation for several functions and types that
were previously undocumented, and improved documentation on other
ones.  As of this release, there remain only two undocumented
symbols: cairo_filter_t and cairo_operator_t.

Other bug fixes
  • cairo-svg: Fix bug that was preventing text from appearing in many

  • cairo-ft: Return correct metrics when hinting is off

  • Cairo 1.3.14 deadlocks in cairo_scaled_font_glyph_extents or


  • cairo crashes in cairo_create_similar if nil surface returned by


  • evolution crash in _cairo_gstate_backend_to_user()

  • Fix memory leak in rectilinear stroking code

Things not in this release
  • Solid-surface-pattern cache: This patch had been applied during
    the 1.3.x series, but it was reverted due to some inter-thread
    problems it caused. The patch is interesting since it made a big
    benefit for text rendering performance---so we'll work to bring a
    corrected version of this patch back as soon as possible.

Have fun with a faster, more robust, cairo!


What is cairo
Cairo is a 2D graphics library with support for multiple output
devices. Currently supported output targets include the X Window
System, win32, and image buffers, as well as PDF, PostScript, and SVG
file output. Experimental backends include OpenGL (through glitz),
Quartz, XCB, BeOS, OS/2, and DirectFB.

Cairo is designed to produce consistent output on all output media
while taking advantage of display hardware acceleration when available
(for example, through the X Render Extension).

The cairo API provides operations similar to the drawing operators of
PostScript and PDF. Operations in cairo including stroking and filling
cubic Bézier splines, transforming and compositing translucent images,
and antialiased text rendering. All drawing operations can be
transformed by any affine transformation (scale, rotation, shear,

Cairo has been designed to let you draw anything you want in a modern
2D graphical user interface.  At the same time, the cairo API has been
designed to be as fun and easy to learn as possible. If you're not
having fun while programming with cairo, then we have failed
somewhere---let us know and we'll try to fix it next time around.

Cairo is free software and is available to be redistributed and/or
modified under the terms of either the GNU Lesser General Public
License (LGPL) version 2.1 or the Mozilla Public License (MPL) version

Where to get more information about cairo
The primary source of information about cairo is:


The latest releases of cairo can be found at:


Snapshots of in-development versions of cairo:


The programming manual for using cairo:


Mailing lists for contacting cairo users and developers:


Answers to some frequently asked questions about cairo:


Detailed list of changes since 1.3.14

Adrian Johnson:
      TrueType: Add post table and 3,0 cmap encoding
      TrueType: fix bug #9998 - build error with gcc 2.95
      PDF/PS: Don't embed multiple copies of the same font
      Win32: Fix _cairo_win32_scaled_font_map_glyphs_to_unicode return type
      Subsetting: Add check for malloc() error
      PDF: Ensure ToUnicode CMap name is unique

Behdad Esfahbod:
      [configure] Improve win32 detection
      [test/Makefile.am] Document why svg2png and pdf2png use LDADD
      [win32] Make win32-surface compile without win32-font
      [test] Add test case for bug #7965 to the get-path-extents test
      [test] Remove ft-text-vertical-layout-type1 from XFAIL
      [PS] Fix rotated image pattern emission by correcting setting the bbox
      [test] Remove text-rotate test from XFAIL as the bugs are fixed now
      [test] Fix syntax typo in text-rotate
      [Makefile.am] Include boilerplate/ in SUBDIRS
      [FreeType] Truely return unhinted advance width if metrics hinting is off
      [xlib/xcb] Check for same_screen in is_compatible
      [test] Add ref image for extend-reflect
      [cairo-surface] Do not err on CAIRO_EXTEND_PAD and CAIRO_EXTEND_REFLECT
      [PS] Update surface_pattern_supported() from PDF
      Support CAIRO_EXTEND_REFLECT on surface patterns
      [cairo-pattern] Fall back on cairo_surface_create_similar in _cairo_pattern_acquire_surface_for_surface
      [cairo-pattern] Correctly delegate device_transform so tests pass again
      [SVG] Use _cairo_pattern_acquire_surface instead of _cairo_surface_acquire_source_image
      [surface] Copy device_transform_inverse in _cairo_surface_clone_similar
      [test] Increase size of extend-reflect test to see that pattern repeats
      [PS/PDF] Accept CAIRO_EXTEND_REFLECT surface patterns natively
      [test] Update surface-pattern test to include transformations
      [test] Remove non-existing test extend-pad
      [PS] Fix surface patterns with transforms
      [test] Add a new, XFAIL, extend-pad test
      [TODO] Add various TODO items
      [SVG] Rename a local variable for clarity
      [SVG] Fix warnings
      [TODO] More TODO items
      [PS] Add note about possible need for fix.
      [Makefile.am] Remove ChangeLog.cache-* in distclean
      [test] Add tests that show xstep/ystep failures in PS/PDF backends
      [PS/PDF] Fix xstep/ystep values for CAIRO_EXTEND_NONE
      [test] Add ref images for new tests
      [cairo.h] Reorder function prototypes a bit for clarity
      [cairo.c] Reorder some function implementations for clarity
      [quartz] Remove comment syntax that is recognized by gtkdoc from regular comments
      Implement cairo_get_scaled_font()
      Slim-hidden cairo_scale()
      [doc] Add new APIs to cairo-sections.txt
      [paginated] Automatically issue a final cairo_show_page()
      [paginated] Also do an automatic show page if nothing ever drawn
      [boilerplate/test-paginated] Issue a show_page before writing buffer
      Revert the solid-pattern cache
      [TODO] Add/remove items
      [RELEASING] Add notifying desktop-devel-list
      [paginated] Also increase page number in copy_page
      [TODO] Add cairo_surface_copy_page()
      [xlib] Drop XrmFinalize() stuff.  That didn't ever exist in any public X server
      [test] Plug a leak in the test suite
      [test] Add leak-revealing path to rectilinear-stroke
      Fix leak in rectilinear stroking code
      [test] Add more valgrind suppressions
      [boilerplate] Add correct dependency on libcairo.la
      [test] Move .la dependencies around
      [PS/PDF] Mark CAIRO_EXTEND_PAD for surface patterns as natively supported
      [test] Support passing extra valgrind flags
      [NEWS] Fix typos
      [doc] Update list of header files to ignore
      [doc] Some documentation love
      Beautify cairo.h
      [doc] Docuemnt all symbols but cairo_filter_t and cairo_operator_t
      [doc] Update templates
      [NEWS] Add note about documentation improvements
      [test] Update list of refrerence images
      [ChangeLog.mk] Adapt to latest git-describe output format
      [Makefile.am] Check for ChangeLog sanity in release-publish
      [test] Include romedalen.png in dist, oops
      [RELEASING] Add note about ChangeLog sanity
      [configure.in] Increase version to 1.3.16 in preparation for release

Brian Ewins:
      [ATSUI] implement load_truetype_table

Carl Worth:
      Bump cairo version to 1.3.15 after making the 1.3.14 snapshot
      Add radial-gradient test case
      Rename radial gradient inner/outer to c1/c2
      Fix implementation of radial gradients for inner radius != 0
      Fix gradient walker to not reset needlessly
      SVG: Support CAIRO_EXTEND_NONE for radial gradients.
      Merge branch 'radial-gradient-fixes' into cairo
      Implement CAIRO_MUTEX_INIT with memcpy instead of pthread_mutex_init
      Cast away a const to quiet a compiler warning.
      Cast -1 values to unsigned to quiet the compiler.
      Update documentation for cairo_get_scaled_font and cairo_get_font_face
      Don't crash if backend->create_similar returns a nil surface
      Fix yet another backend (quartz) for the gradient renaming
      Add test of cairo_get_* after INVALID_RESTORE to nil-surface
      Fix INVALID_RESTORE case to avoid crashes
      Fix leak in pdiff lpyramid
      Add a couple of missing test cases to .gitignore
      Add even more XrmGetFileDatabase leaks to the valgrind suppressions file
      Augment cairo_test_init with cairo_test_fini to avoid leak
      Fix leak in pattern-getters test (missing cairo_pattern_destroy)
      More tightening of test cleanup to avoid valgrind complaints.
      Fix leak of an output stream in cairo_type1_font_destroy
      Add notes for 1.3.16

Emmanuel Pacaud:
      Set overflow to visible for symbols.

Jeff Muizelaar:
      Add two new test cases to degenerate-path test
      Add a new dashing test
      Add a comment about the point choice when capping degenerate paths
      Rename has_sub_path to has_initial_sub_path
      Fix several issues with dashed stroking code, particularly 'leaky-dash'
      Rename tmp to step_length because that is what it actually is.
      Use a closed interval when eliminating outliers from performance measurements

Jeff Smith:
      Change type of cairo_stroker_t's dash_on from int to cairo_bool_t
      Modify how _cairo_stroker_add_caps handles zero-length sub-paths
      Minor changes to shorten the stroking code
      Add or reword several comments in the stroking code
      Clean up some inconsistent spacing in the stroking code

Jinghua Luo:
      glitz: fix build error.

Jorn Baayen:
      [cairo-pattern] Cache surface for solid patterns

Vladimir Vukicevic:
      [quartz] Rename nquartz to quartz
      [quartz] rename NQUARTZ -> QUARTZ in defines
      [quartz] rename test override images from nquartz to quartz
      [quartz] Rename public function parameter from surf -> surface
      [quartz] Remove (disabled) support for rendering via AGL/CGGL
      [core] Add user_data and reference count getters to all objects
      [core] put back REF_COUNT_INVALID to be -1, fix finish
      [quartz] Bug 3939 - Fix Quartz backend endianness problem

cairo-announce mailing list
cairo-announce at cairographics.org

More information about the cairo mailing list