bug-gnustep
[Top][All Lists]
Advanced

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

Patch for GSHorizontalTypesetter.m to wrap CJK glyph


From: Yen-Ju Chen
Subject: Patch for GSHorizontalTypesetter.m to wrap CJK glyph
Date: Thu, 31 Jul 2003 16:25:47 -0400

Each CJK glyph should be treated as a word when wrapping word.
This patch check the CJK character and make the wrapping correct.
PS. I'm not sure it is a perfect patch, but it basically works.

Yen-Ju

*** GSHorizontalTypesetter.m.orig       Thu Jul 31 15:54:24 2003
--- GSHorizontalTypesetter.m    Thu Jul 31 16:18:37 2003
***************
*** 272,277 ****
--- 272,289 ----
          g->size.width = 0;
          return gi + 1 + cache_base;
        }
+ else if ((ch > 0x2ff0) && (ch < 0x9fff)) /* The range should work for most cases */
+         {
+           g->dont_show = NO;
+           if (gi > 0)
+             {
+               g->pos = g[-1].pos;
+               g->pos.x += g[-1].size.width;
+             }
+           else
+             g->pos = NSMakePoint(0,0);
+           return gi + cache_base;
+         }
       gi--;
       g--;
     }

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]