Hi,

At Thu, 10 May 2001 23:09:23 +0900 (JST),
Kazutoshi Kubota <[EMAIL PROTECTED]> wrote:

> I wrote a patch for this problem with referring to implementation of
> the eterm, and tested on FreeBSD 4.3, NetBSD-1.5.1-BETA and Solaris8
> (those systems are x86 platform).

I tested the linespace patch and found a bug.  When I input some
string via XIM, preedit characters are displayed at a bit wrong
position.  I attached a patch to fix this problem.  (This patch
is for CVS-2001-05-10 + MY-2001-05-09-PATCH + Kazutoshi-'s-2001-
05-10-PATCH.)

BTW, the image Kazutoshi prepared 
( http://www.asahi-net.or.jp/~tu7k-kbt/unix/rxvt.html ) is a good
example of improving readability by inserting a few pixels of gaps
between lines of Japanese text.  Alost Japanese fonts are designed
to use almost full boundary box (in other words, with little or no
margin, or X{mb,wc}TextExtents() returns almost same XRectangle
overall_ink_return and XRectangle overall_logical_return), just as
shown in the image.

---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://www.debian.or.jp/~kubota/
"Introduction to I18N"  http://www.debian.org/doc/manuals/intro-i18n/

diff -ruN kubota+lsp/src/main.c kubota+lsp.1/src/main.c
--- kubota+lsp/src/main.c       Sat May 12 09:41:26 2001
+++ kubota+lsp.1/src/main.c     Sat May 12 10:06:26 2001
@@ -1273,6 +1273,7 @@
     if (scrollbar_visible(r) && !(r->Options & Opt_scrollBar_right))
        vtx = scrollbar_TotalWidth();
     mbh = menubar_visible(r) ? menuBar_TotalHeight() : 0;
+    mbh -= r->TermWin.lineSpace;
 
     preedit_rect->x = needed_rect->width + vtx;
     preedit_rect->y = Height2Pixel(r->TermWin.nrow - 1) + mbh;
diff -ruN kubota+lsp/src/screen.c kubota+lsp.1/src/screen.c
--- kubota+lsp/src/screen.c     Sat May 12 09:51:33 2001
+++ kubota+lsp.1/src/screen.c   Sat May 12 10:33:00 2001
@@ -3514,7 +3514,7 @@
 
     XGetWindowAttributes(r->Xdisplay, r->TermWin.vt, &xwa);
     pos->x = Col2Pixel(r->screen.cur.col) + xwa.x;
-    pos->y = Height2Pixel((r->screen.cur.row + 1)) + xwa.y;
+    pos->y = Height2Pixel((r->screen.cur.row + 1)) - r->TermWin.lineSpace + xwa.y;
 }
 #endif
 /* ------------------------------------------------------------------------- */

Reply via email to