Request for pango freeze break



I'd like to put the attached change into pango-1.6.0. What
it does is change a single Unicode character (U+3000, 
IDEOGRAPHIC SPACE) to go through the font selection code
path for printing characters instead of for spaces.

Chance of problems is pretty much zero, and it fixes a
fairly serious problem with the display of East-Asian
documents. (In quite a few circumstances, the ideographc
space is displaying as a hex square.)

Thanks,
					Owen

? pango/opentype/gsub-2.diff
? pango/opentype/gsub-3.diff
? pango/opentype/gsub-4.diff
? pango/opentype/gsub.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/pango/ChangeLog,v
retrieving revision 1.970
diff -u -p -r1.970 ChangeLog
--- ChangeLog	13 Sep 2004 14:24:05 -0000	1.970
+++ ChangeLog	13 Sep 2004 14:24:49 -0000
@@ -1,3 +1,9 @@
+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)
+
 Mon Aug 16 14:17:56 2004  Owen Taylor  <otaylor redhat com>
 
 	* examples/renderdemo.c (fc_substitute_func): Fix reversed
Index: pango/pango-context.c
===================================================================
RCS file: /cvs/gnome/pango/pango/pango-context.c,v
retrieving revision 1.71
diff -u -p -r1.71 pango-context.c
--- pango/pango-context.c	10 Jul 2004 21:41:37 -0000	1.71
+++ pango/pango-context.c	13 Sep 2004 14:24:49 -0000
@@ -1057,7 +1057,19 @@ itemize_state_process_run (ItemizeState 
       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;

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]