No need to guarding against the pointer being NULL on internal functions
as no path can call the function will a NULL pointer and no path should
ever try, which in any case it would be better to crash immediately.
This variable was expanding to an empty string, so the next -I flag
was getting completely swallowed. Let's avoid being clever and just
use . which is what we want in the expansion anyway.
Use a utility function to wrap an incoming error status into a new
error stream. As a side-effect, all error streams must be destroyed as
in the general case the caller can not distinguish between a static
error object and one allocated to hold an unusual error status.
Previously the CGFontRef was recreated each time in show_glyphs; this
caused the font to get re-embedded in any PDF files that were being
generated through Quartz.
In ecb895803b Carl made fallback show_glyphs
always use a A8 mask in case of mixed-format glyphs. That's suboptimal if
there are ARGB32 glyphs. Using masks smartly we can implement the desired
behavior. Done now.
Ensure that the ctm remains invertible after multiplying the user
supplied matrices. Although the arguments are checked so that they are
valid per se, we double check that the result after multiplication is
still a valid invertible matrix. This should catch pathological cases
where the user concatenates a long series of matrix operations, which
either exceed our numerical limits or become degenerate through rounding
errors.
Ensure that the error is propagated to the target surface if we fail
whilst performing an operation on its behalf, for example set the size
of the paginated surface.
On the default case for an unknown pattern type, add an assert that the
code is never reached, and just in case upgrade the error to a fatal
PATTERN_TYPE_MISMATCH.
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.