[gtk/wip/chergert/glproto] fix positioning of glyphs



commit 8a815d6d35b9bc09ea5a48994858cae1b561f0eb
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 19 14:16:01 2021 -0800

    fix positioning of glyphs
    
    use the right vertex position

 gsk/next/gskglrenderjob.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gsk/next/gskglrenderjob.c b/gsk/next/gskglrenderjob.c
index 9ba57d7afd..c1ac95ec88 100644
--- a/gsk/next/gskglrenderjob.c
+++ b/gsk/next/gskglrenderjob.c
@@ -2503,7 +2503,6 @@ gsk_gl_render_job_visit_text_node (GskGLRenderJob *job,
       gsk_gl_program_set_uniform_color (program, UNIFORM_COLORING_COLOR, color);
     }
 
-  memset (&lookup, 0, sizeof lookup);
   lookup.font = (PangoFont *)font;
   lookup.scale = (guint) (text_scale * 1024);
 
@@ -2586,10 +2585,10 @@ gsk_gl_render_job_visit_text_node (GskGLRenderJob *job,
       vertices[4].uv[0] = tx;
       vertices[4].uv[1] = ty2;
 
-      vertices[4].position[0] = glyph_x2;
-      vertices[4].position[1] = glyph_y;
-      vertices[4].uv[0] = tx2;
-      vertices[4].uv[1] = ty;
+      vertices[5].position[0] = glyph_x2;
+      vertices[5].position[1] = glyph_y;
+      vertices[5].uv[0] = tx2;
+      vertices[5].uv[1] = ty;
 
 next:
       x_position += gi->geometry.width;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]