diff --git a/src/hb-vector-paint-svg.cc b/src/hb-vector-paint-svg.cc index 07eecf62a..01cab0a5e 100644 --- a/src/hb-vector-paint-svg.cc +++ b/src/hb-vector-paint-svg.cc @@ -576,17 +576,16 @@ hb_vector_paint_push_clip_path_end (hb_paint_funcs_t *, unsigned pfx_len = paint->id_prefix_length; unsigned clip_id = paint->clip_path_counter++; - /* The accumulated path is in font Y-up coords (the - * convention used inside per-glyph - * wrappers); this clip is emitted at base body level - * (free-form between glyphs), so flip its geometry inside - * the clipPath via the path's own transform attribute, - * keeping the body's at body Y-down. */ + /* The accumulated path is in font Y-up coords, the same + * space as the body's that references it: + * the whole body is wrapped in a single scale(1,-1) at + * render time, so no per-clip flip here (matches the + * glyph and rectangle clips above). */ paint->defs.append_str ("defs.append_len (pfx, pfx_len); paint->defs.append_str ("cp"); paint->defs.append_unsigned (clip_id); - paint->defs.append_str ("\">defs.append_str ("\">defs.append_len (paint->path.arrayZ, paint->path.length); paint->defs.append_str ("\"/>\n"); diff --git a/test/vector/data/expected/basic/paint-show-extents.svg b/test/vector/data/expected/basic/paint-show-extents.svg new file mode 100644 index 000000000..249cbee06 --- /dev/null +++ b/test/vector/data/expected/basic/paint-show-extents.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/vector/data/tests/basic.tests b/test/vector/data/tests/basic.tests index 0c7c6eec9..376910f0a 100644 --- a/test/vector/data/tests/basic.tests +++ b/test/vector/data/tests/basic.tests @@ -16,3 +16,4 @@ ../../../api/fonts/Roboto-Regular.abc.ttf;--font-size=65536;U+0061,U+0062,U+0063;../expected/basic/glyf-quadratics.pdf ../../../api/fonts/TwemojiMozilla.subset.default.32,3299.ttf;--font-size=65536;U+3299;../expected/basic/colrv0-large-scale.svg ../../../api/fonts/TwemojiMozilla.subset.default.32,3299.ttf;--font-size=65536;U+3299;../expected/basic/colrv0-large-scale.pdf +../../../api/fonts/Roboto-Regular.abc.ttf;--paint --show-extents;U+0061,U+0062,U+0063;../expected/basic/paint-show-extents.svg