diff --git a/gsk/gpu/gskgpudevice.c b/gsk/gpu/gskgpudevice.c index 5c2abb7ac0..54ae5e7d95 100644 --- a/gsk/gpu/gskgpudevice.c +++ b/gsk/gpu/gskgpudevice.c @@ -709,8 +709,8 @@ gsk_gpu_device_lookup_glyph_image (GskGpuDevice *self, .height = rect.size.height + 2 * padding, }, scale, - &GRAPHENE_POINT_INIT (cache->origin.x + 1, - cache->origin.y + 1)); + &GRAPHENE_POINT_INIT (cache->origin.x + padding, + cache->origin.y + padding)); g_hash_table_insert (priv->glyph_cache, cache, cache); gsk_gpu_cached_use (self, (GskGpuCached *) cache, gsk_gpu_frame_get_timestamp (frame)); diff --git a/testsuite/gsk/compare/big-box-glyph-nocairo.node b/testsuite/gsk/compare/big-box-glyph-nocairo.node new file mode 100644 index 0000000000..a60455ea0e --- /dev/null +++ b/testsuite/gsk/compare/big-box-glyph-nocairo.node @@ -0,0 +1,7 @@ +transform { + transform: scale(30); + child: text { + font: "text-mixed-color 7.5"; + glyphs: 7 10; + } +} diff --git a/testsuite/gsk/compare/big-box-glyph-nocairo.png b/testsuite/gsk/compare/big-box-glyph-nocairo.png new file mode 100644 index 0000000000..dec701227d Binary files /dev/null and b/testsuite/gsk/compare/big-box-glyph-nocairo.png differ diff --git a/testsuite/gsk/fonts/text-mixed-color.ttf b/testsuite/gsk/fonts/text-mixed-color.ttf index b875433905..291102a1b9 100644 Binary files a/testsuite/gsk/fonts/text-mixed-color.ttf and b/testsuite/gsk/fonts/text-mixed-color.ttf differ diff --git a/testsuite/gsk/fonts/text-mixed-color.ttx b/testsuite/gsk/fonts/text-mixed-color.ttx index deaf81f104..76b742deb0 100644 --- a/testsuite/gsk/fonts/text-mixed-color.ttx +++ b/testsuite/gsk/fonts/text-mixed-color.ttx @@ -10,6 +10,7 @@ + @@ -80,6 +81,7 @@ + @@ -141,6 +143,21 @@ + + + + + + + + + + + + + + + @@ -182,6 +199,7 @@ + diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index b0fb721e62..28ddebb4b7 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -10,6 +10,7 @@ node_parser = executable('node-parser', 'node-parser.c', ) compare_render_tests = [ + 'big-box-glyph-nocairo', 'big-checkerboard', 'big-checkerboard-scaled-down', 'big-checkerboard-scaled-down-nearest',