rendernodeparser: Use advance width for glyphs

Commit f5159e1ecb introduced more flexible ways of specifying
glyph strings in node files, but it used ink rect width instead
of the more appropriate advance width when reconstrucing the
glyph string.

Fix expected output of one test to match.
This commit is contained in:
Matthias Clasen
2024-11-03 20:10:04 -05:00
parent 89d17ec86e
commit cb0c4d6e88
2 changed files with 4 additions and 4 deletions

View File

@@ -2638,11 +2638,11 @@ unpack_glyphs (PangoFont *font,
}
else
{
PangoRectangle ink_rect;
PangoRectangle rect;
pango_font_get_glyph_extents (font, gi->glyph, &ink_rect, NULL);
pango_font_get_glyph_extents (font, gi->glyph, NULL, &rect);
gi->geometry.width = ink_rect.width;
gi->geometry.width = rect.width;
}
}

View File

@@ -1,6 +1,6 @@
text {
color: rgb(50,50,50);
font: "Cantarell 14px";
glyphs: "N", 430 4.2002, 406 6.10352, 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
glyphs: "Ntp", 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
offset: 0 32.0186;
}