summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-09-20 17:34:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-09-20 17:34:30 +0000
commitecbb0ce3cf2c834ccb2f650da9673bada145fc5f (patch)
treed2a3bddbc8f3e87cc4f007463f17e6d5c0581398 /pango/pango-context.c
parent1ef52b779f5c4ceeaebfaa5568ff7eea80969427 (diff)
downloadpango-ecbb0ce3cf2c834ccb2f650da9673bada145fc5f.tar.gz
Except ideographic spaces from the !g_unichar_isgraph() test. (#145275,
Mon Sep 13 10:18:51 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-context.c (itemize_state_process_run): Except ideographic spaces from the !g_unichar_isgraph() test. (#145275, Federic Zhang)
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 83873d5c..79b70187 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1063,7 +1063,19 @@ itemize_state_process_run (ItemizeState *state)
PangoEngineShape *shape_engine;
PangoFont *font;
- if (!g_unichar_isgraph (wc))
+ /* We don't want space characters to affect font selection; in general,
+ * it's always wrong to select a font just to render a space.
+ * To make this really work well, we'd need to emulate missing
+ * space characters, which we don't yet do, so we sometimes
+ * will get hex boxes.
+ *
+ * The exception of U+3000 (IDEOGRAPHIC SPACE) here is because we
+ * want to choose an ideographic space that matches ideographic text
+ * in cell width. Even if we were emulating missing spaces, an
+ * emulated ideographic space for the primary font wouldn't be the
+ * right size.
+ */
+ if (!g_unichar_isgraph (wc) && wc != 0x3000)
{
shape_engine = NULL;
font = NULL;