summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsk/gskrendernodeimpl.c10
-rw-r--r--gsk/ngl/gsknglrenderjob.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index d611977acc..640c792268 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -4435,9 +4435,15 @@ gsk_text_node_new (PangoFont *font,
self->has_color_glyphs = font_has_color_glyphs (font);
self->color = *color;
self->offset = *offset;
- self->num_glyphs = glyphs->num_glyphs;
self->glyphs = g_malloc_n (glyphs->num_glyphs, sizeof (PangoGlyphInfo));
- memcpy (self->glyphs, glyphs->glyphs, glyphs->num_glyphs * sizeof (PangoGlyphInfo));
+
+ /* skip empty glyphs */
+ self->num_glyphs = 0;
+ for (int i = 0; i < glyphs->num_glyphs; i++)
+ {
+ if (glyphs->glyphs[i].glyph != PANGO_GLYPH_EMPTY)
+ self->glyphs[self->num_glyphs++] = glyphs->glyphs[i];
+ }
graphene_rect_init (&node->bounds,
offset->x + ink_rect.x - 1,
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index b45f33b7a8..fa2c9c8cb9 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -2720,9 +2720,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
float cy;
guint texture_id;
- if G_UNLIKELY (gi->glyph == PANGO_GLYPH_EMPTY)
- continue;
-
lookup.glyph = gi->glyph;
cx = (float)(x_position + gi->geometry.x_offset) / PANGO_SCALE;