Re: U+20nn displaying in Pango



Toshio MARUYAMA <marutosi syd odn ne jp> writes:

> U+203E is maped from 0x7E in SJIS, that is Japanese character set.
> 
> I got sources from CVS.
> And I built examples/pango-viewr form examples/viewer-qt.[cc,h]
> in RedHat Linux 7.1, and I executed this.
> But U+203E is not displayed.
> 
> I digged into the source codes and found this reason.
> 
> In map_add_engine() of pango/modules.c,
> first, U+20nn mapentry set BasicScriptEngineX.
> That is, map->submaps[0x20].d.entry = BasicScriptEngineX.
> But, when interpreting DevanagariScriptEngineX,
> BasicScriptEngineX entry is lost,
> and set map->submaps[0x20].d.leaves[0x0d] = DevanagariScriptEngineX .
> ( 0x200d is 8205 .)

[...]

> I suppose it is strange that changing lines order reflects displaying.
> Is this specification ?
> 
> I suppose it is better that either map_add_engine() modefied
> to save previous map entry infomation
> or remove 0x200d from basic_ranges[] in modules/basic/basic-x.c .

Yes, this is basically just a bug in map_add_engine(). I'm making
the following change.

Regards,
                                        Owen

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/pango/ChangeLog,v
retrieving revision 1.264
diff -u -r1.264 ChangeLog
--- ChangeLog	2001/05/18 20:45:47	1.264
+++ ChangeLog	2001/05/28 16:16:36
@@ -1,3 +1,15 @@
+Mon May 28 11:51:45 2001  Owen Taylor  <otaylor redhat com>
+
+	* pango/modules.c (map_add_engine): Fix problem with
+	information loss when converting leaves to branches.
+	(Problem found by Toshio MARUYAMA)
+
 Fri May 18 16:44:25 2001  Owen Taylor  <otaylor redhat com>
 
 	* pango/pango-layout.c (ensure_tab_width): Use the font
Index: pango/modules.c
===================================================================
RCS file: /cvs/gnome/pango/pango/modules.c,v
retrieving revision 1.25
diff -u -r1.25 modules.c
--- pango/modules.c	2000/12/15 19:47:45	1.25
+++ pango/modules.c	2001/05/28 16:16:36
@@ -437,13 +437,12 @@
 	    {
 	      if (map->submaps[submap].is_leaf)
 		{
+		  PangoMapEntry old_entry = map->submaps[submap].d.entry;
+		  
 		  map->submaps[submap].is_leaf = FALSE;
 		  map->submaps[submap].d.leaves = g_new (PangoMapEntry, 256);
 		  for (j=0; j<256; j++)
-		    {
-		      map->submaps[submap].d.leaves[j].info = NULL;
-		      map->submaps[submap].d.leaves[j].is_exact = FALSE;
-		    }
+		    map->submaps[submap].d.leaves[j] = old_entry;
 		}
 	      
 	      for (j=start; j<=end; j++)






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