summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-08-22 23:14:07 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-08-22 23:14:07 +0000
commitb865a622e2fc2085a6a908065509e00d306350b4 (patch)
tree23b2bd31dc7244cf4ec9634f3d19691a48e536b9
parent7cfb4d3eb628e5384b317a443da0d8efd5f2411d (diff)
downloadpango-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.
-rw-r--r--ChangeLog10
-rw-r--r--pango/pango-context.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a8c4c115..07329fef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
+
2006-08-21 Behdad Esfahbod <behdad@gnome.org>
* === Released 1.14.1 ===
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;