This commit adds the following new functions to the cairo-ps API:
cairo_ps_surface_dsc_comment
cairo_ps_surface_dsc_begin_setup
cairo_ps_surface_dsc_begin_page_setup
Many thanks are due to Michael Sweet who provided invaluble guidance
during the design of this API.
It is hoped that with this API in place, basically all printer control
that is likely to be desired to be performed with cairo PostScript
output is now possible.
This commit augments the ps-features test to exercise the new API.
Add a new cairo_ps_surface_set_size which can be used to produce a
PostScript file consisting of pages of various different sizes (or
orientations).
Also add a new test (ps-features.c) for testing this and subsequent
ps-specific function calls.
This addresses the original problem noted in mozilla's bug #336129:
Missing out-of-memory check at gfx/cairo/cairo/src/cairo-atsui-font.c:185
https://bugzilla.mozilla.org/show_bug.cgi?id=336129
This also adds a comment pointing out another malloc that is not
checked, (but does not fix it).
I've removed cairo_svg_surface_create_xxx functions, and instead implemented
the following ones:
cairo_svg_surface_restrict_to_version
cairo_svg_get_versions
cairo_svg_version_to_string
If we find a glyph image of a format that is different from the font's
format, then we use a temporary image and convert to the font's
format.
This provides a simple fix for the crash identified in bug #4705:
crash at XRenderAddGlyphs
https://bugs.freedesktop.org/show_bug.cgi?id=4705
A later improvement would guarantee that the "font's format" was
carefully chosen to be able to contain all glyphs in the font without
information loss.
This optimisation takes care to not replay what was done
before surface is cleared. We don't erase recorded commands
since we may have earlier snapshots of this surface.
(cherry picked from 926e2494ca2211e9117ab70fc427208d125e1bd5 commit)
The new paginated create_similar simply forwards to target backend create_similar.
We maintain the fact that PS and PDF surfaces are returning image
surfaces for create_similar by moving that explicitly to their own
create_similar functions.
(This commit is the combination of the following original commits:
6b69e8c012adb4f2fc2ee9c1579fed8214e8f510
2589db92a4395f8e900dbc4eafc45982f0d985d3
)
To hit the Firefox 3 schedule in early 2007 we'll need to have a 1.4 release
out much sooner. Let's shoot for October 2006 which gives 6 months between
1.2 and 1.4.
Also, sunmoon1997 has identified a couple more important issues to be fixed
before 1.2 releases.