mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Merge branch 'fix-upside-down-labels' into 'main'
gsk: Avoid a crash with negative scales See merge request GNOME/gtk!5236
This commit is contained in:
commit
74806ed324
@ -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;
|
||||
|
8
testsuite/gsk/compare/upside-down-label-3d.node
Normal file
8
testsuite/gsk/compare/upside-down-label-3d.node
Normal file
@ -0,0 +1,8 @@
|
||||
transform {
|
||||
transform: scale(-1, -1) translate(-100, -100);
|
||||
child: text {
|
||||
font:"Cantarell 20";
|
||||
glyphs:"ABC";
|
||||
offset: 0 0;
|
||||
}
|
||||
}
|
BIN
testsuite/gsk/compare/upside-down-label-3d.png
Normal file
BIN
testsuite/gsk/compare/upside-down-label-3d.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 806 B |
@ -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
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user