diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-07 15:45:14 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-25 00:50:40 -0400 |
commit | 49cd1c08f86ee29761190268071779959c36009b (patch) | |
tree | ace6d1c1dc75a37032d595076064b6ba3596a22c /pango/pangocairo-font.c | |
parent | c7a2b41a22b78bd74956c02f2960859fbe0c9112 (diff) | |
download | pango-49cd1c08f86ee29761190268071779959c36009b.tar.gz |
cairo: Render visible space differently
Instead of a [SPC] hex box, just render a
centered dot, as is commonly used to indicate
space. Also render synthetic glyphs for tabs
and newlines.
This makes single-paragraph mode prettier.
Diffstat (limited to 'pango/pangocairo-font.c')
-rw-r--r-- | pango/pangocairo-font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c index 3bf83857..a49d14d4 100644 --- a/pango/pangocairo-font.c +++ b/pango/pangocairo-font.c @@ -720,7 +720,9 @@ _pango_cairo_font_private_get_glyph_extents_missing (PangoCairoFontPrivate *cf_p gunichar ch; gint rows, cols; - if (glyph == (0x20 | PANGO_GLYPH_UNKNOWN_FLAG)) + ch = glyph & ~PANGO_GLYPH_UNKNOWN_FLAG; + + if (ch == 0x20 || ch == 0x2423) { get_space_extents (cf_priv, ink_rect, logical_rect); return; @@ -733,8 +735,6 @@ _pango_cairo_font_private_get_glyph_extents_missing (PangoCairoFontPrivate *cf_p return; } - ch = glyph & ~PANGO_GLYPH_UNKNOWN_FLAG; - if (G_UNLIKELY (glyph == PANGO_GLYPH_INVALID_INPUT || ch > 0x10FFFF)) { rows = hbi->rows; |