diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index e0c87cadf0..e30a1e1341 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -2938,7 +2938,7 @@ gsk_gl_render_job_visit_text_node (GskGLRenderJob *job, const PangoFont *font = gsk_text_node_get_font (node); const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); const graphene_point_t *offset = gsk_text_node_get_offset (node); - float text_scale = MAX (job->scale_x, job->scale_y); /* TODO: Fix for uneven scales? */ + float text_scale = MAX (fabs (job->scale_x), fabs (job->scale_y)); /* TODO: Fix for uneven scales? */ guint num_glyphs = gsk_text_node_get_num_glyphs (node); float x = offset->x + job->offset_x; float y = offset->y + job->offset_y; diff --git a/testsuite/gsk/compare/upside-down-label-3d.node b/testsuite/gsk/compare/upside-down-label-3d.node new file mode 100644 index 0000000000..af647250f3 --- /dev/null +++ b/testsuite/gsk/compare/upside-down-label-3d.node @@ -0,0 +1,8 @@ +transform { + transform: scale(-1, -1) translate(-100, -100); + child: text { + font:"Cantarell 20"; + glyphs:"ABC"; + offset: 0 0; + } +} diff --git a/testsuite/gsk/compare/upside-down-label-3d.png b/testsuite/gsk/compare/upside-down-label-3d.png new file mode 100644 index 0000000000..0cbbadb40d Binary files /dev/null and b/testsuite/gsk/compare/upside-down-label-3d.png differ diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index 82fe0d5dfc..3c90dd632e 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -85,6 +85,7 @@ compare_render_tests = [ 'transform-in-transform', 'transform-in-transform-in-transform', 'unaligned-offscreen', + 'upside-down-label-3d', # not really 3d, but cairo fails it 'rounded-clip-in-clip-3d', # not really 3d, but cairo fails it ]