gsk/vulkanglyphcache: Cleanup maths

A trivial cleanup to match what the GL renderer does
This commit is contained in:
Georges Basile Stavracas Neto 2023-03-22 23:45:09 -03:00
parent 981e94505c
commit c85599e2e8

View File

@ -270,11 +270,8 @@ render_glyph (Atlas *atlas,
gi.glyph = key->glyph;
gi.geometry.width = value->draw_width * 1024;
if (key->glyph & PANGO_GLYPH_UNKNOWN_FLAG)
gi.geometry.x_offset = key->xshift * 256;
else
gi.geometry.x_offset = key->xshift * 256 - value->draw_x * 1024;
gi.geometry.y_offset = key->yshift * 256 - value->draw_y * 1024;
gi.geometry.x_offset = (0.25 * key->xshift - value->draw_x) * 1024;
gi.geometry.y_offset = (0.25 * key->yshift - value->draw_y) * 1024;
glyphs.num_glyphs = 1;
glyphs.glyphs = &gi;