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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user