As a result of the changes to improve the status checking,
_cairo_type2_charstrings_init() was failing due to the failure
status returned when the font->output stream is destroyed.
This is because _cairo_type2_charstrings_init() does not
create an output stream.
Fix this by initializing font->output to NULL and only
destroy it if not NULL.
Thanks to Solaris-using Brian Cameron for pointing out that our
shell scripts are bash-specific. We'd be glad if someone cared to
rewrite them to not require bash, but for now let's have truth in
advertising at least.
Put the glyph names in the Encoding array the same as is done for
Type 1 and Type42 fonts.
Acroread and Evince are still unable to correctly extract the text
after conversion with ps2pdf. However examining the pdf file shows
the glyph names are correct so this is probably a limitation of
Acroread and Evince.
7 quartz/argb32/similar tests were showing failures due to
random bits being set. The problem turned out to be that the
initial test surface was not cleared before the similar surface
was created by push_group. The problem behaviour is more obvious
if you run the tests with MallocScribble=1.
Fix this by calling memset after bitmap allocation; the multiplication
here cannot overflow since we already checked that in malloc_ab.
The implementation of EXTEND_NONE was not filling areas outside
the image with rgba(0,0,0,0). This showed up on the operator-source
test, the fix makes the quartz and image renderings identical.
This reverts commit 2fd50a7897.
Spoke too soon, quartz doesn't like creating those 0x0
images; while the tests pass, its putting warnings in the logs.
Reverting to make a better fix.
Some tests, like invalid-matrix, generate a 0x0 bitmap; in
the quartz backend this caused a nil surface to be returned,
whereas the tests expect a quartz surface. Other surfaces
return a backend-specific surface with a zero-sized bitmap,
quartz should do the same.
Fixes the tests ft-font-create-for-ft-face, get-and-set,
get-clip, invalid-matrix, line-width-zero,
select-font-no-show-text, solid-pattern-cache-stress,
surface-finish-twice, and text-cache-crash.
All the copied data buffers except the first one weren't completely
initialized (num_ops and num_points). That was the cause of the failure
of some vector surface tests, like random-intersections.
When emitting combined stroke and fill, cairo SVG backend was using the opacity
two times, instead of using fill-opacity and stroke-opacity, leading to
incorrect output.
I've updated the mask test reference images for the SVG output, since it seems
there's a bug in librsvg when fill-opacity is used in the mask image.
I've checked the SVG output with batik, and it looks fine.
Allow using a previous test output directory as a source of
reference images. To make use of this, set the environment
variable 'CAIRO_REF_DIR' to point at an old test directory,
relative to the current test directory.
This is useful for testing backends when reference images haven't
been created yet, or which the current reference image structure
can't accomodate, like multiple font backends.
The generated test html guesses the names of the reference
images used in the tests. This is quite often wrong, and
makes it harder to change policy in cairo-test. Teach
make-html.pl to parse the log for the path to the reference image.
The test logs currently do not record the paths of
image output, the reference images tested against, and
the diffs created. This means that make-html.pl has to
duplicate the policy in cairo-test.c. Fix this by teaching
cairo-test.c to log the paths.
win32-glyph-metrics.patch: GetGlyphOutline only works on Truetype fonts,
so for non-Truetype fonts, assume no left or right bearing and use the
font ascent and descent for the glyph extents.
Quartz has a bug with images greater than (signed) 16 bits in height; avoid
creating or working with those. Also fixes some memory leaks.
Patch from John Daggett.
If a surface resolution is set via _cairo_surface_set_resolution, it
needs to be used when the fallback image is created. The user sets
the fallback resolution on the paginated surface, so we need
to divide that by the resolution of the actual (target) surface, not
the paginated surface.
https://bugs.freedesktop.org/show_bug.cgi?id=13084 demonstrates a
regression where the clip is ignored by the xlib backend whilst
rendering text. Therefore we extend the current test cases to combine
a clip that represents everything clipped out with the rendering of
text. For completeness, we add a new test case that exactly mimics the
sequence of cairo operations that lead to the discovery of this bug -
namely the rendering of text with an empty clip path.
The height is currently mapped to the atsui metrics property capHeight, which
is documented as "The height of a capital letter in the font from the baseline
to the top of the letter".
That doesn't match what height is in cairo, it should be the disctance between
baselines. This patch that fixes that (and makes webkit on GTK+ OS X
layout nicely).
Whilst NEED_MEMORY_BARRIER should be a subset of ! HAS_ATOMIC_OPS,
until we have accurate configure tests NEED_MEMORY_BARRIER may be
invoked independently.