[pango/visible-things] layout: Don't zero the width of visible space
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/visible-things] layout: Don't zero the width of visible space
- Date: Mon, 8 Jul 2019 19:28:27 +0000 (UTC)
commit c9c98a6f1de722145077ed71c3640b58406c0b34
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 8 15:27:22 2019 -0400
layout: Don't zero the width of visible space
Without this, we are getting the [LS] hex box
rendered on top of the last character in a line,
when the line separator ends up being visible.
pango/pango-layout.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index dcfe6c63..51cea4ce 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5251,6 +5251,10 @@ zero_line_final_space (PangoLayoutLine *line,
PangoGlyphString *glyphs = run->glyphs;
int glyph = item->analysis.level % 2 ? 0 : glyphs->num_glyphs - 1;
+ if ((glyphs->glyphs[glyph].glyph & PANGO_GLYPH_UNKNOWN_FLAG) &&
+ (glyphs->glyphs[glyph].glyph != PANGO_GET_UNKNOWN_GLYPH (0x20)))
+ return; /* this space is visible */
+
/* if the final char of line forms a cluster, and it's
* a whitespace char, zero its glyph's width as it's been wrapped
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]