*** empty log message ***
authorroot <root>
Sat, 18 Jun 2005 10:59:21 +0000 (10:59 +0000)
committerroot <root>
Sat, 18 Jun 2005 10:59:21 +0000 (10:59 +0000)
Changes
doc/rxvt.1.html
doc/rxvt.1.man.in
doc/rxvt.1.txt
src/rxvtfont.C
src/version.h

diff --git a/Changes b/Changes
index 9af1ab4936492d3a6a9020acd7bca40c38a1da81..7a1d868237334cdeb6748ab07b719e09b47211d8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -22,6 +22,12 @@ WISH: just for fun, do shade and tint with XRender.
         - rewrote the low-level xft drawing function ("xft backend" for the
           hipper parts of the world) to hopefully cope better with proportional
           chars mixed with fixed-width ones.
+        - rxvt is now much more careful (read: slower) with potentially
+          overlapping xft characters. It usually overshoots and redraws
+          more than required, but that's better than undershooting and
+          cutting pieces off of characters.
+        - rxvt is now more restrictive in what font heights it accepts for
+          fonts that will likely overshoot or underhsoot lines.
 
 5.5  Sat Apr 23 22:31:36 CEST 2005
        - re-enabled modifer state matching as in 5.3, but implement
index cf1770accbd6b3988f36c8fe50e80f2b096ca804..a38c4c446922e1dde35143fa17db7afe58128b12 100644 (file)
@@ -338,7 +338,7 @@ Put scrollbar on right/left; resource <strong>scrollBar_right</strong>.
 <dt><strong><a name="item__2dst_7c_2bst"><strong>-st</strong>|<strong>+st</strong></a></strong><br />
 </dt>
 <dd>
-Display normal (non XTerm/NeXT) scrollbar without/with a trough;
+Display rxvt (non XTerm/NeXT) scrollbar without/with a trough;
 resource <strong>scrollBar_floating</strong>.
 </dd>
 <p></p>
@@ -764,7 +764,7 @@ Use the specified colour for the scrollbar [default #B2B2B2].
 </dt>
 <dd>
 Use the specified colour for the scrollbar's trough area [default
-#969696]. Only relevant for normal (non XTerm/NeXT) scrollbar.
+#969696]. Only relevant for rxvt (non XTerm/NeXT) scrollbar.
 </dd>
 <p></p>
 <dt><strong><a name="item_bordercolor_3a_colour"><strong>borderColor:</strong> <em>colour</em></a></strong><br />
@@ -894,7 +894,7 @@ xterm style selection.
 </dt>
 <dd>
 Set scrollbar style to <strong>rxvt</strong>, <strong>plain</strong>, <strong>next</strong> or <strong>xterm</strong>. <strong>plain</strong> is
-the author's favourite..
+the author's favourite.
 </dd>
 <p></p>
 <dt><strong><a name="item_title_3a_string"><strong>title:</strong> <em>string</em></a></strong><br />
index fb7ea088f31f55507f6e8e1a4f8174d0a65e545b..73c62b2983eb8b686f5a4e296a116831e276b4d0 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 1"
-.TH rxvt 1 "2005-04-22" "5.5" "RXVT-UNICODE"
+.TH rxvt 1 "2005-06-18" "5.5" "RXVT-UNICODE"
 .SH "NAME"
 rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system)
 .SH "SYNOPSIS"
@@ -336,7 +336,7 @@ This only takes effect if \fB\-si\fR is also given; resource
 Put scrollbar on right/left; resource \fBscrollBar_right\fR.
 .IP "\fB\-st\fR|\fB+st\fR" 4
 .IX Item "-st|+st"
-Display normal (non XTerm/NeXT) scrollbar without/with a trough;
+Display rxvt (non XTerm/NeXT) scrollbar without/with a trough;
 resource \fBscrollBar_floating\fR.
 .IP "\fB\-ptab\fR|\fB+ptab\fR" 4
 .IX Item "-ptab|+ptab"
@@ -628,7 +628,7 @@ Use the specified colour for the scrollbar [default #B2B2B2].
 .IP "\fBtroughColor:\fR \fIcolour\fR" 4
 .IX Item "troughColor: colour"
 Use the specified colour for the scrollbar's trough area [default
-#969696]. Only relevant for normal (non XTerm/NeXT) scrollbar.
+#969696]. Only relevant for rxvt (non XTerm/NeXT) scrollbar.
 .IP "\fBborderColor:\fR \fIcolour\fR" 4
 .IX Item "borderColor: colour"
 The colour of the border around the text area and between the scrollbar
@@ -726,7 +726,7 @@ xterm style selection.
 .IP "\fBscrollstyle:\fR \fImode\fR" 4
 .IX Item "scrollstyle: mode"
 Set scrollbar style to \fBrxvt\fR, \fBplain\fR, \fBnext\fR or \fBxterm\fR. \fBplain\fR is
-the author's favourite..
+the author's favourite.
 .IP "\fBtitle:\fR \fIstring\fR" 4
 .IX Item "title: string"
 Set window title string, the default title is the command-line
index c7652a4e11a578dd8029f3032f859de2e2dc5785..16e38a749ccf6e4fedf36137d8b2a1b8b623f096 100644 (file)
@@ -206,7 +206,7 @@ OPTIONS
         Put scrollbar on right/left; resource scrollBar_right.
 
     -st|+st
-        Display normal (non XTerm/NeXT) scrollbar without/with a trough;
+        Display rxvt (non XTerm/NeXT) scrollbar without/with a trough;
         resource scrollBar_floating.
 
     -ptab|+ptab
@@ -483,7 +483,7 @@ RESOURCES (available also as long-options)
 
     troughColor: *colour*
         Use the specified colour for the scrollbar's trough area [default
-        #969696]. Only relevant for normal (non XTerm/NeXT) scrollbar.
+        #969696]. Only relevant for rxvt (non XTerm/NeXT) scrollbar.
 
     borderColor: *colour*
         The colour of the border around the text area and between the
@@ -579,7 +579,7 @@ RESOURCES (available also as long-options)
 
     scrollstyle: *mode*
         Set scrollbar style to rxvt, plain, next or xterm. plain is the
-        author's favourite..
+        author's favourite.
 
     title: *string*
         Set window title string, the default title is the command-line
index 0531e82250d154b16d3e5b42ef2c1bc002983077..c449943ba47f8c5885a892c70f4755d2112c1c19 100644 (file)
@@ -853,7 +853,7 @@ rxvt_font_x11::load (const rxvt_fontprop &prop)
       int dir_ret, asc_ret, des_ret;
       XTextExtents16 (f, &ch, 1, &dir_ret, &asc_ret, &des_ret, &g);
 
-      int wcw = wcwidth (*t); if (wcw > 0) g.width = g.width / wcw;
+      int wcw = wcwidth (*t); if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
 
       if (width  < g.width)  width  = g.width;
     }
@@ -938,7 +938,7 @@ rxvt_font_x11::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car
   // check character against base font bounding box
   int w = xcs->width;
   int wcw = wcwidth (unicode);
-  if (wcw > 0) w /= wcw;
+  if (wcw > 0) w = (w + wcw - 1) / wcw;
 
   careful = w > prop->width;
   if (careful && w > prop->width * MAX_OVERLAP >> 2)
@@ -1156,6 +1156,8 @@ rxvt_font_xft::load (const rxvt_fontprop &prop)
 
       XftUnlockFace (f);
 
+      int glheight = height;
+
       for (uint16_t *t = extent_test_chars + NUM_EXTENT_TEST_CHARS; t-- > extent_test_chars; )
         {
           FcChar16 ch = *t;
@@ -1173,15 +1175,18 @@ rxvt_font_xft::load (const rxvt_fontprop &prop)
           XGlyphInfo g;
           XftTextExtents16 (disp, f, &ch, 1, &g);
 
+          g.width -= g.x;
+
           int wcw = wcwidth (ch);
-          if (wcw > 0) g.width = g.width / wcw;
+          if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
 
-          if (width  < g.width)  width  = g.width;
-          if (height < g.height) height = g.height;
+          if (width    < g.width       ) width    = g.width;
+          if (height   < g.height      ) height   = g.height;
+          if (glheight < g.height - g.y) glheight = g.height - g.y;
         }
 
       if (prop.height == rxvt_fontprop::unset
-          || height <= prop.height
+          || (height <= prop.height && glheight <= prop.height)
           || height <= 2
           || !scalable)
         break;
@@ -1232,9 +1237,9 @@ rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car
   XGlyphInfo g;
   XftTextExtents32 (DISPLAY, f, &ch, 1, &g);
 
-  int w = g.width;
+  int w = g.width - g.x;
   int wcw = wcwidth (unicode);
-  if (wcw > 0) w /= wcw;
+  if (wcw > 0) w = (w + wcw - 1) / wcw;
 
   careful = w > prop->width;
   if (careful && w > prop->width * MAX_OVERLAP >> 2)
index cfabe8143f231ccb987d1545033b04322f5fc5b2..58cd5eb627d8f6b8da14d5090674f64f05efb135 100644 (file)
@@ -1,3 +1,3 @@
 // VERSION _must_ be \d.\d+
-#define VERSION "5.5"
+#define VERSION "5.6"
 #define DATE   "2005-04-23"