The FT change is because my MinGW build is using a more recent version
of FT.
Remove the disabled _cairo_win32_scaled_font_text_to_glyphs() code to
fix the defined but not used warning.
_cairo_win32_scaled_font_text_to_glyphs() was diabled in d9408041aa with
the comment:
"Currently disable the win32-font text_to_glyphs(), until that one
is updated. Or better yet, remove it and implement
ucs4_to_index(). It's the toy font API afterall."
_cairo_win32_scaled_font_ucs4_to_index() was added in d1c619bc7d.
In practice, the A and B images may be any mixture of RGB24 and
ARGB32 formats, so this change accepts all combinations of these
types, and converts the pixel values to a common (ARGB32) format
as needed.
Some of the newly added test failures are cases where the image
output is RGB24, but the matching reference image is ARGB32 with
noticeable transparency. Some of the newly passing tests are cases
where the unused 'alpha' channel of an RGB24 image was not equal
to 0xff, and the previous code had incorrectly used this channel
in max_diff calculations.
To avoid reading a potentially garbage alpha channel when users
of pdiff_compare pass in RGB24 images, if the format is RGB24,
force the alpha channel to be 0xff.
This commit also updates CI to adjust for the new tests that have
started/stopped failing. New failures often are cases where
the reference image has alpha transparency, but the test output
does not; new passing tests may indicate that the unused alpha
channel of an RGB24 image was garbage, but now is ignored.
The proper pthread check activated some tests that weren't active
before, which resulted in a test failure apparently caused by
inexact test rendering.
Update the quartz reference image accordingly.
COLR fonts can have a layer with the same color as the current text
color. This change passes the current color (if solid) through to
the font backend where it can be used to render color fonts.
scaled_glyph_lookup checks if the foreground color has changed (for
glyph that require it) and requests a new color surface if required.
This also fixes a bug where scaled_glyph_lookup would always request a
color surface for glyphs for glyphs in color fonts that do not have
color.
We are trying to get an approximate bounding box for
the extents of a glyph string and use it for bailing
early if there's nothing to do, but the code computing
that approximation makes invalid assumptions: It assumes
that a glyph never extends further than max-advance-width
before or after its position. That is not true in general,
as can be seen in https://gitlab.gnome.org/GNOME/gtk/-/issues/4132
In the example there, we have a monospace fonts with ligatures
that have a negative lsb of two or three times the glyph width.
The optimization here could theoretically be fixed by iterating
over the font once to determine suitable values for how far
glyphs can extend before or after their position, but this
patch just removes it.
Don't ship wrap files for things that are only dependencies
of dependencies, such as gperf (for fontconfig), or
libffi + proxy-libintl (for glib).
Instead, let Meson use the wraps that these subprojects ship,
which Meson will pick up automatically since v56, so there's
no need for us to ship these wraps any more.
Bump the Meson requirement to 0.56 accordingly.
Fix expat package dep for fedora ci and bump the tag so it gets
picked up.
See https://mesonbuild.com/Release-notes-for-0-56-0.html#wraps-from-subprojects-are-automatically-promotedCloses#445
To fix this warning:
../src/cairo-malloc-private.h:83:32: warning: comparison is always false due to limited range of data type [-Wtype-limits]
83 | ((size) != 0 && (size_t) (a) >= SIZE_MAX / (size_t) (size) ? NULL : \
| ^~
Create two new macros to do the overflow checks:
_cairo_addl_size_t_overflow and _cairo_mul_size_t_overflow. Implement
them using compiler builtins where available.
Update cairo-malloc-private to use these fuctions and add an overflow
test to test the functions.