*** empty log message ***
authorroot <root>
Sat, 18 Jun 2005 09:02:37 +0000 (09:02 +0000)
committerroot <root>
Sat, 18 Jun 2005 09:02:37 +0000 (09:02 +0000)
Changes
src/command.C
src/rxvt.h
src/screen.C

diff --git a/Changes b/Changes
index c8dcee321dffd2b7474833b223da4b943aaf3db5..bab5f07b4f59011abf6032993781d28690c9f8b1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -14,8 +14,11 @@ WISH: just for fun, do shade and tint with XRender.
 
 5.6
         - R_SB_RXVT bitset value was 0, so rxvt scrollbar was initialised
-          every time (original rxvt also affected). Reported by Jasmin
-          Buchert.
+          every time resulting in display errors (original rxvt also affected).
+          Reported by Jasmin Buchert.
+        - font names are now considered to be utf-8 encoded (xft apperently
+          uses this convention. X Core fonts might not, but it should be rare).
+          Affects display in iso14755 box.
 
 5.5  Sat Apr 23 22:31:36 CEST 2005
        - re-enabled modifer state matching as in 5.3, but implement
index 11f703df452d305cfe53abd3046f39361234ffd7..31cd888326bcf4c066f34a569ec8a399bb3ffe79 100644 (file)
@@ -165,9 +165,11 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
 {
   rxvt_fontset *fs = FONTSET (r);
   rxvt_font *f = (*fs)[fs->find_font (ch)];
-  wchar_t *chr, *alloc, ch2;
+  wchar_t *chr, *alloc, ch2, *fname;
   int len;
 
+  fname = rxvt_utf8towcs (f->name);
+
 #if ENABLE_COMBINING
   if (IS_COMPOSE (ch))
     {
@@ -185,7 +187,7 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
       len = 1;
     }
 
-  int width = strlen (f->name);
+  int width = wcswidth (fname, wcslen (fname));
 
   scr_overlay_new (0, -1, width < 8+5 ? 8+5 : width, len + 1);
 
@@ -208,7 +210,9 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
       scr_overlay_set (12, y, NOCHAR, r);
     }
 
-  scr_overlay_set (0, len, f->name);
+  scr_overlay_set (0, len, fname);
+
+  free (fname);
 
 #if ENABLE_COMBINING
   if (alloc)
index 3643235e35230544b3cf85db8d5cb981daa54422..bb3e38057d5041c6f9d1c8067258372d8879485d 100644 (file)
@@ -1229,6 +1229,7 @@ struct rxvt_term : zero_initialized, rxvt_vars {
                         text_t text,
                         rend_t rend = OVERLAY_RSTYLE);
   void scr_overlay_set (int x, int y, const char *s);
+  void scr_overlay_set (int x, int y, const wchar_t *s);
 #endif
 
   vector<void *> allocated;           // free these memory blocks with free()
index a46937a33ebf687e18456d3c40d34c3e39194a0f..f91155fc1ed967635fa0024d4370c981c714fd03 100644 (file)
@@ -3797,6 +3797,22 @@ rxvt_term::scr_overlay_set (int x, int y, const char *s)
     scr_overlay_set (x++, y, *s++);
 }
 
+void
+rxvt_term::scr_overlay_set (int x, int y, const wchar_t *s)
+{
+  while (*s)
+    {
+      text_t t = *s++;
+      int width = wcwidth (t);
+
+      while (width--)
+        {
+          scr_overlay_set (x++, y, t);
+          t = NOCHAR;
+        }
+    }
+}
+
 void
 rxvt_term::scr_swap_overlay ()
 {