Ensure that no assumptions are made that a small allocation will succeed
by manually injecting faults when we may be simply allocating from an
embedded memory pool.
The main advantage in manual fault injection is improved code coverage -
from within the test suite most allocations are handled by the embedded
memory pools.
Return the true error status whel
_cairo_ft_unscaled_font_create_internal(). This ensures that the original
error is not masked and we are able to report the error during fontconfig
pattern resolution.
Assert that the pattern is one of the four known types, and return an
error so that the compiler knows that the local variable can not be used
uninitialised.
Be careful not to pass an error object down to emit_image() hook,
propagate the error instead. This relieves the burden of the error check
from the callee -- which was causing an assertion failure in the ps
backend.
Avoid secondary allocations of the thin region wrappers during surface
creation by embedding them into the parent structure. This has the
satisfactory side-effect of not requiring status checks which current code
lacks.
Eliminate the extremely short-lived and oft unnecessary heap allocation
of the region by first checking to see whether the clip exceeds the
surface bounds and only then intersect the clip with a local
stack-allocated region.
Do not use the simple malloc() as memfault will inject allocation failures
(unlike xmalloc() for which faults are excluded) - as this is unnecessary
inside the test harness and thus does not exercise any cairo code paths.
Include zlib and libpng dependencies using something like '$(cairo_dir)/../zlib/zdll.lib'
instead of just 'zdll.lib'. Also, do similarly for the headers.
Andrew Cowie reported a problem with the Charis SIL font being
embedded as a fallback font.
The buffer size check for composite glyphs was incorrect causing the
subsetting to fail for some fonts.
The _cairo_win32_scaled_font_backend version of show_glyphs collects
glyph runs to hand to ExtTextOutW until the y-offset changes, then flushes the
glyphs buffered so far. As each glyph is buffered, it also calculates and
buffers the dx value for the preceding glyph.
However, when it sees a change in dy and decides to flush, it should *not*
append an entry to the dx buffer, as this would be the "dx" of the previous
glyph, and instead the new start_x value will be used for the new glyph run
that's being collected. This bug means that after any vertically-offset glyph,
the remaining glyphs in the run will get incorrect dx values (horizontal
escapement).
Mozilla bug #475092
Specifically,
cairo_region_union_rect -> cairo_region_union_rectangle
cairo_region_create_rect -> cairo_region_create_rectangle
Also delete cairo_region_clear() which is not that useful.