diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-08-22 23:14:07 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-08-22 23:14:07 +0000 |
commit | b865a622e2fc2085a6a908065509e00d306350b4 (patch) | |
tree | 23b2bd31dc7244cf4ec9634f3d19691a48e536b9 /pango | |
parent | 7cfb4d3eb628e5384b317a443da0d8efd5f2411d (diff) | |
download | pango-b865a622e2fc2085a6a908065509e00d306350b4.tar.gz |
Find shaper/font for Private Use and space characters too. Finding shaper
2006-08-22 Behdad Esfahbod <behdad@gnome.org>
* 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
should be synthesized if they are not available in the font, but
falling back to other fonts is far easier, and should give pretty good
results with the current set of common fonts. These fixes allow
Firefox+Pango to render MathML like Firefox+Xft does.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-context.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c index 2e0c2bb4..51d709b4 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1082,17 +1082,19 @@ itemize_state_process_run (ItemizeState *state) /* 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. + * + * The exception of PrivateUse characters is indeed necessary to be + * able to render any of them. */ - if (!g_unichar_isgraph (wc) && wc != 0x3000) + if (G_UNLIKELY (!g_unichar_isgraph (wc) && + !g_unichar_isspace (wc) /*wc != 0x3000*/ && + g_unichar_type (wc) != G_UNICODE_PRIVATE_USE)) { shape_engine = NULL; font = NULL; |