[pango/visible-things: 21/35] fc: Handle lack of visible space glyph
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/visible-things: 21/35] fc: Handle lack of visible space glyph
- Date: Mon, 8 Jul 2019 20:58:31 +0000 (UTC)
commit 46d71c41a91633f4cc5b4adae0ca35bdb76debe1
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 7 14:39:01 2019 -0400
fc: Handle lack of visible space glyph
If the font does not have a glyph for 0x2423,
draw a hexbox for this glyph to make space visible.
pango/pangofc-shape.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index ca2a819a..f9afe4d8 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -104,6 +104,9 @@ pango_fc_hb_font_get_nominal_glyph (hb_font_t *font, void *font_data,
*glyph = pango_fc_font_get_glyph (fc_font, 0x2423);
if (*glyph)
return TRUE;
+
+ *glyph = PANGO_GET_UNKNOWN_GLYPH (0x2423);
+ return TRUE;
}
}
@@ -520,7 +523,11 @@ _pango_fc_shape (PangoFont *font,
if (shape_flags & PANGO_SHAPE_SHOW_SPACE)
{
space_glyph = pango_fc_font_get_glyph (fc_font, 0x20);
+ if (!space_glyph)
+ space_glyph = PANGO_GET_UNKNOWN_GLYPH (0x20);
visible_space_glyph = pango_fc_font_get_glyph (fc_font, 0x2423);
+ if (!visible_space_glyph)
+ visible_space_glyph = PANGO_GET_UNKNOWN_GLYPH (0x2423);
}
for (i = 0; i < num_glyphs; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]