diff --git a/test/api/fonts/bad_colrv1.ttf b/test/api/fonts/bad_colrv1.ttf new file mode 100644 index 000000000..df548efe4 Binary files /dev/null and b/test/api/fonts/bad_colrv1.ttf differ diff --git a/test/api/results/bad-20-0-154 b/test/api/results/bad-20-0-154 new file mode 100644 index 000000000..eea42f685 --- /dev/null +++ b/test/api/results/bad-20-0-154 @@ -0,0 +1,349 @@ +start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + start clip rectangle 0.000000 500.000000 500.000000 1000.000000 + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + push group + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + push group + start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000 + start clip glyph 159 + start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000 + solid 128 128 128 102 + end transform + end clip + end transform + pop group mode 3 + pop group mode 3 + end clip +end transform diff --git a/test/api/test-paint.c b/test/api/test-paint.c index df44a8a1a..f0e2bb421 100644 --- a/test/api/test-paint.c +++ b/test/api/test-paint.c @@ -274,6 +274,7 @@ typedef struct { #define NOTO_HAND "fonts/noto_handwriting-cff2_colr_1.otf" #define TEST_GLYPHS "fonts/test_glyphs-glyf_colr_1.ttf" +#define BAD_COLRV1 "fonts/bad_colrv1.ttf" #define ROCHER_ABC "fonts/RocherColorGX.abc.ttf" /* To verify the rendering visually, use @@ -294,6 +295,7 @@ static paint_test_t paint_tests[] = { { TEST_GLYPHS, 20, 0, 123, 0, "test-20-0-123" }, { TEST_GLYPHS, 20, 0, 165, 0, "test-20-0-165" }, // linear gradient { TEST_GLYPHS, 20, 0, 175, 0, "test-20-0-175" }, // layers + { BAD_COLRV1, 20, 0, 154, 0, "bad-20-0-154" }, // recursion /* COLRv0 */ { ROCHER_ABC, 120, 0.3, 1, 0, "rocher-120-0.3-1" }, { ROCHER_ABC, 120, 0.3, 2, 2, "rocher-120-0.3-2" },