diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-08-22 23:27:34 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-08-22 23:27:34 +0000 |
commit | 8190bbc4522d092a604ebcad42abe06f48d6d036 (patch) | |
tree | 1e10e091abd62785b7a16dea7e95f7feded56391 | |
parent | 58359bf5d1fcfb54a160992df44dd897854f5bdd (diff) | |
download | pango-8190bbc4522d092a604ebcad42abe06f48d6d036.tar.gz |
Replace (!isgraph && !isspace) with (!isprint) which is equivalent. Also,
2006-08-22 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-context.c (itemize_state_process_run): Replace (!isgraph
&& !isspace) with (!isprint) which is equivalent. Also, update
comments.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | pango/pango-context.c | 11 |
2 files changed, 16 insertions, 3 deletions
@@ -1,5 +1,13 @@ 2006-08-22 Behdad Esfahbod <behdad@gnome.org> + * pango/pango-context.c (itemize_state_process_run): Replace (!isgraph + && !isspace) with (!isprint) which is equivalent. Also, update + comments. + +2006-08-22 Behdad Esfahbod <behdad@gnome.org> + + Part of Bug 145275 – Font selection for space characters + * pango/pango-context.c (itemize_state_process_run): Find shaper/font for Private Use and space characters too. Finding shaper for Private Use is needed for any practical use of those areas. Ideally, spaces diff --git a/pango/pango-context.c b/pango/pango-context.c index 0d8c3def..8aee2a0d 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1256,7 +1256,9 @@ itemize_state_process_run (ItemizeState *state) PangoFont *font; /* 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. + * it's always wrong to select a font just to render a space. But until + * we have a better solution, choosing a font for spaces seems to work + * better. * * The exception of U+3000 (IDEOGRAPHIC SPACE) here is because we * want to choose an ideographic space that matches ideographic text @@ -1267,8 +1269,11 @@ itemize_state_process_run (ItemizeState *state) * The exception of PrivateUse characters is indeed necessary to be * able to render any of them. */ - if (G_UNLIKELY (!g_unichar_isgraph (wc) && - !g_unichar_isspace (wc) /*wc != 0x3000*/ && + /* + if (G_UNLIKELY (!g_unichar_isgraph (wc) && wc != 0x3000 && + g_unichar_type (wc) != G_UNICODE_PRIVATE_USE)) + */ + if (G_UNLIKELY (!g_unichar_isprint (wc) && g_unichar_type (wc) != G_UNICODE_PRIVATE_USE)) { shape_engine = NULL; |