The current NaN check is insufficient as it classifies inf as a valid
determinant. We can improve the test by using isfinite() - but only
when it is available. We use the feature test macros as being the
simplest way of determining the presence of isfinite() as it may be
implemented as a macro, making checking for its usability troublesome
during configure.
Behdad, once again the arbiter of good taste, objected to the use of
the dotfile within the Makefile, and suggested that one calls $MAKE to
pre-process the source file from within the check scripts.
Doing so removes the ugly wart added to Makefile.am...
This fixes the remaining image-backend problems with bug 13479:
Ugly Courier New font with cairo 1.4.12
https://bugs.freedesktop.org/show_bug.cgi?id=13479
although the xlib-backend had been fixed previously.
Specifically, if an A1 glyph is first encountered, then subsequent
glyphs will still be rendered with antialiasing, (previously they
would be rendered very poorly without antialiasing).
Similarly, if the first glyph encountered has component-alpha
sub-pixel antialiasing and then an A1 or A8 glyph is encountered
then all glyphs will rendered in A8 (grayscale antialiasing).
Previously, the non-subpixel-antialiased glyphs would not appear
at all.
Behdad Esfahbod objected to the execution of a compiled program to check
symbol visibility as it makes cross-compilation more difficult.
Instead of executing the program, this method conditionally exports
a variable if cairo uses symbol hiding and scans the executable for
that symbol in a similar manner to check-def.sh. This has the slight
advantage of using the Makefile for performing the compilation, rather
than attempting to invoke $(CPP) from a shell script within the test
environment.
Add a paranoid check that at least one font backend is available - this
should have been already caught by configure, but it should help if a new
font backend is ever added.
Compile a trivial program such that it reports whether cairo is hiding
its internal symbols and skip the tests that depend upon it.
This prevents false errors, such as bug 12726, where the user is
presented with a scary make check failure.
Bug 13342 corresponds with a rebuild of cairo after removing
--enable-glitz from the configure line. Under these circumstances,
the remaining installable headers are not modified and therefore
cairo.def is not rebuilt and still expects to find a reference to
cairo_glitz_surface_create. The solution is to rebuild cairo.def after
any modification to the 'public' headers (installable or otherwise).
Adrian Johnson found that adding $(EXEEXT) to TESTS broke the build
under mingw. After a bit of investigation, the issue was tracked down
to being caused by automake-1.7. Bump the autotools version
requirements to avoid the breakage.
For non solid patterns _fill and _show_glyphs sets a clip
path then paints the pattern. Previously if the path is empty
SelectClipPath did not set clip. This was probably the cause
of bug 13657 where the entire page was black.
Fix this by not painting anything if the path is empty.
Non Windows fonts are drawn by getting the outline path, setting
this is the clip path, and painting the source pattern. For
solid colors this can avoid the clip and just do a fill.
==3429== Conditional jump or move depends on uninitialised value(s)
==3429== at 0x4E3FB0F: _cairo_box_round_to_rectangle (cairo-fixed-private.h:196)
==3429== by 0x4E34B29: _cairo_clip_intersect_to_rectangle (cairo-clip.c:162)
==3429== by 0x4E31943: cairo_push_group_with_content (cairo.c:495)
==3429== by 0x403044: draw (clip-zero.c:48)
==3429== by 0x404221: cairo_test_expecting (cairo-test.c:377)
==3429== by 0x64701C3: (below main) (libc-start.c:222)
Caused by setting extents->p2.y to zero twice.
test/pattern-get-type exposes a bug whereby we try to acquire the
_cairo_pattern_solid_pattern_cache_lock before initializing the
mutexes. To fix this move the CAIRO_MUTEX_INITIALIZE() from the
depths of _cairo_pattern_init() and perform it at the public entry
points.
Due to my incomplete cross-build environment, configure detects the
presence of rsvg and poppler, but they cannot be used. To make my life
easier, add a check similar to that used for fontconfig to ensure the
libraries are usable before compiling the optional test utilites.
Use the generic surface layer cairo_surface_show_page() instead of
directly calling cairo_paginated_surface_show_page(), as the higher
level performs more error checking.
More the majority of the typedefs from cairoint.h to
cairo-types-private.h and fixup cairo-pdf-operators-private.h to
avoid including cairoint.h.
A better approach would seem to be to rationalise cairoint.h so that it
only provides the symbol aliasing, moving the types and functions to
more appropriate private headers. However, this fixes the immediate
problem of running make check!
A problem with the previous commit for checking the PS level is that
with the default PS level of 3 it prevents PS files from printing on
Level 2 printers even if no Level 3 operators are used.
As the PS header is created after the page content has been generated,
it is easy to check the PS Level actually required and set this in the
header and PS level check code.
http://bugzilla.mozilla.org/show_bug.cgi?id=406376
reported problems with cairo PostScipt output printing black boxes
instead of images. This was found to caused by printing Level 3
PostScript to a Level 2 printer.
Add some PostScript code to to the cairo PS prolog to check the
language level of the printer. If the printer can not print the job, a
message stating the required language level is printed and the job is
aborted.
This should fix the problems reported in
http://lists.cairographics.org/archives/cairo/2007-November/012172.html
The problem is that GetCharacterPlacement() used in
_win32_scaled_font_text_to_glyphs returns utf16 instead of glyph
indices when Type 1 fonts are used.
This has been fixed by using GetGlyphIndices instead of
GetCharacterPlacement if the font is a Type 1.
_win32_scaled_font_map_glyphs_to_unicode has been fixed work with Type 1
glyph indices. It now uses GetFontUnicodeRanges and GetGlyphIndices
to do the reverse lookup.
Now that the content stream is no longer split into multiple streams
it is not possible to implement a copy_page function that shares the
common content between pages.
Remove this function so the paginated surface will rewrite the
content from the meta surface.
Each fallback image needs to be in a separate group in the knockout
group. Otherwise transparent edges of adjacent fallback images will
composite with each other creating visible seams between the images.
The PDF surface needs to know when the fallback images start so it can
close off the content stream and create a knockout transparency group
for the fallback images. Currently it does this by looking for
operations with CAIRO_OPERATOR_SOURCE. PDF returns unsupported for
_SOURCE during the analysis phase so _SOURCE will never appear during
native operations. However this prevents the PDF surface from
supporting _SOURCE operations that can be natively supported. For
example a _SOURCE operation with nothing painting under it can be
converted to _OVER and natively supported.
A third mode, CAIRO_PAGINATED_MODE_FALLBACK, has been added. The
paginated surface will set this mode before it paints finer-grained
fallback images.
Previously this was done in a separate group. Now that the PDF backend
has been re-organized to not interrupt the content stream the clipping
can be done in the same stream.
To fix this performance issue
http://lists.cairographics.org/archives/cairo/2007-December/012197.html
the PDF surface needs to avoid starting and stopping the content
stream every time it emits a pattern. This patch makes the PDF surface
store a list of all patterns used while the content stream is written
out then write out all the patterns after the content stream is
closed.