From 781fe2d7faa2a710162fdf70c95b0aeee87658b1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 10 Jan 2024 07:56:52 -0500 Subject: [PATCH] gsk: Add a compare test for mixed color runs This tests the fixes in aa82190da659b5 and dcaa2c4ccb182c74cb40. The test uses a custom font named 'text-mixed-color' which contains six glyphs that are just boxes. Glyphs 1, 2, 3 are just plain glyphs, and glyphs 4, 5, 6 are color glyphs in red, green and blue. The glyphs are mapped to the characters A, B, C, D, E, F. The test is currently disabled for cairo, since it has some issues with transformed color glyphs. --- .../gsk/compare/text-mixed-color-nocairo.node | 7 + .../gsk/compare/text-mixed-color-nocairo.png | Bin 0 -> 176 bytes testsuite/gsk/fonts/text-mixed-color.ttf | Bin 0 -> 632 bytes testsuite/gsk/fonts/text-mixed-color.ttx | 189 ++++++++++++++++++ testsuite/gsk/meson.build | 1 + 5 files changed, 197 insertions(+) create mode 100644 testsuite/gsk/compare/text-mixed-color-nocairo.node create mode 100644 testsuite/gsk/compare/text-mixed-color-nocairo.png create mode 100644 testsuite/gsk/fonts/text-mixed-color.ttf create mode 100644 testsuite/gsk/fonts/text-mixed-color.ttx diff --git a/testsuite/gsk/compare/text-mixed-color-nocairo.node b/testsuite/gsk/compare/text-mixed-color-nocairo.node new file mode 100644 index 0000000000..db43dc1797 --- /dev/null +++ b/testsuite/gsk/compare/text-mixed-color-nocairo.node @@ -0,0 +1,7 @@ +transform { + transform: translate(0, 100); + child: text { + font: "text-mixed-color 20"; + glyphs: 1 20, 2 20, 3 20, 4 20 0 0 color, 5 20 0 0 color, 6 20 0 0 color; + } +} diff --git a/testsuite/gsk/compare/text-mixed-color-nocairo.png b/testsuite/gsk/compare/text-mixed-color-nocairo.png new file mode 100644 index 0000000000000000000000000000000000000000..adfcfdf6b183eea65279c9eb3aef81077e6f430f GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^B|t38!3HF&6Fs&9sd7&j$B>N1w--0^9x>oyFjVwT z`|tThSfzFK`9_l~Qk(MIme|htz54sxGjeA>*HxFq-K*Yo@1C*o_0#H~9Gi}DNGWIZ hEHEUEamfBR<6D-><8yUiuK+rM!PC{xWt~$(696GxLY@Es literal 0 HcmV?d00001 diff --git a/testsuite/gsk/fonts/text-mixed-color.ttf b/testsuite/gsk/fonts/text-mixed-color.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b875433905c564ce3d19212988b41f940e111592 GIT binary patch literal 632 zcmc&xJxc>Y5Pf@hesXBkMy)OqB!z(pA{Ma-L9qxZ+6rvfs3HBT3yE&%79ZOJ5yOJSCu9M zXOnocmV_-FU=dIY#B)3G(RSzl^pW_OxZ8-r`tV z=ecC!W-UaFE^#b43DXt^&_mo$9PEWj)Ok3(WPP7_3eu~ZIBPB4y>1Pc-r-0Z@O;gd z#NJkK#CkBif>f5leKylp=PD8l^re2gQ9B1%}Xyy=$b%w|Wj9zLW~Q~e)!sXY4CZ3bvZX}gf@rcu36YsSre-pby2 g$lT90vM9co=+{fVt>!MRYt*+MAo-vw{3s3oPl-86l>h($ literal 0 HcmV?d00001 diff --git a/testsuite/gsk/fonts/text-mixed-color.ttx b/testsuite/gsk/fonts/text-mixed-color.ttx new file mode 100644 index 0000000000..deaf81f104 --- /dev/null +++ b/testsuite/gsk/fonts/text-mixed-color.ttx @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text-mixed-color + + + + + + + + + + + + + + + + + + diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 398962ca7f..a12e3a2922 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -129,6 +129,7 @@ compare_render_tests = [ 'stroke-clipped-nogl', 'stroke-opacity', 'stroke-with-3d-contents-nogl-nocairo', + 'text-mixed-color-nocairo', 'texture-coords', 'texture-scale-filters-nocairo', 'texture-scale-magnify-10000x',