summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormrdotx2022-02-02 09:12:44 +0100
committermrdotx2022-02-02 09:12:44 +0100
commit69701a09c2c206233952b84bc966407f6774f1dc (patch)
treeac2bd6dfbd1de2d8ec083f0ce7552e2730b3aff6
parent15c4969efd58e0afcd4fdef79406c94b3a4e5de8 (diff)
downloadaur-69701a09c2c206233952b84bc966407f6774f1dc.tar.gz
update to 9.30
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--24-bit-color.patch78
-rw-r--r--PKGBUILD41
-rw-r--r--enable-wide-glyphs.patch44
-rw-r--r--improve-font-rendering.patch98
6 files changed, 149 insertions, 130 deletions
diff --git a/.SRCINFO b/.SRCINFO
index db61710a53a6..e1ef9cbece63 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rxvt-unicode-truecolor-wide-glyphs
pkgdesc = Unicode enabled rxvt-clone terminal emulator (urxvt) with true color, enhanced glyphs and improved font rendering support
- pkgver = 9.26
- pkgrel = 2
+ pkgver = 9.30
+ pkgrel = 1
url = http://software.schmorp.de/pkg/rxvt-unicode.html
arch = i686
arch = x86_64
@@ -10,6 +10,7 @@ pkgbase = rxvt-unicode-truecolor-wide-glyphs
depends = libxt
depends = perl
depends = startup-notification
+ depends = libptytty
optdepends = gtk2-perl: to use the urxvt-tabbed
provides = rxvt-unicode
provides = rxvt-unicode-terminfo
@@ -20,7 +21,7 @@ pkgbase = rxvt-unicode-truecolor-wide-glyphs
conflicts = urxvt-resize-font
conflicts = urxvt-perls
conflicts = urxvt-perls-git
- source = http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-9.26.tar.bz2
+ source = http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.30.tar.bz2
source = urxvt.desktop
source = urxvtc.desktop
source = urxvt-tabbed.desktop
@@ -29,14 +30,14 @@ pkgbase = rxvt-unicode-truecolor-wide-glyphs
source = 24-bit-color.patch
source = enable-wide-glyphs.patch
source = improve-font-rendering.patch
- sha1sums = d325d8cdea6bcb8e0b8b219b8451bf5c690b6c62
+ sha1sums = 700265a255eedf0f553cadfe5484bf71f8fb74c2
sha1sums = b5a4507f85ebb7bac589db2e07d9bc40106720d9
sha1sums = 62c4ffecfce6967def394dd4d418b68652372ea2
sha1sums = cd204d608d114d39c80331efe0af0231ad6b7e18
sha1sums = a61366659c73bd551fa99a8415bb71e033897598
sha1sums = 9883d0c31b45f8521829ea6a2041f2e9eb7abe6a
- sha1sums = 560097c0d6377461fcbe4c109f3113a6bcb38982
- sha1sums = c5ee4a50902d8c8d278938b080464a16d2c6af56
- sha1sums = 772b62071d73c0021adf334f037b95ef13d34317
+ sha1sums = b5a239179a6da062bcc9c5a36e870387080372d2
+ sha1sums = 5c11265e5c54fdc7e005aa0a3c55de3374f15a73
+ sha1sums = a62225c18458ed9d1743699ef98f41d3d157f145
pkgname = rxvt-unicode-truecolor-wide-glyphs
diff --git a/.gitignore b/.gitignore
index 2da7e0157831..f06026654482 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,10 @@
# path: /home/klassiker/.local/share/repos/rxvt-unicode-truecolor-wide-glyphs/.gitignore
# author: klassiker [mrdotx]
# github: https://aur.archlinux.org/packages/rxvt-unicode-truecolor-wide-glyphs
-# date: 2021-01-15T13:55:08+0100
+# date: 2021-11-23T18:32:26+0100
/pkg/
/src/
rxvt-unicode-*.bz2
+libptytty-*.gz
*.pkg.tar*
diff --git a/24-bit-color.patch b/24-bit-color.patch
index d66181e9dcb0..fcce87d1dbfb 100644
--- a/24-bit-color.patch
+++ b/24-bit-color.patch
@@ -1,6 +1,6 @@
--- config.h.in
+++ config.h.in
-@@ -395,6 +395,9 @@
+@@ -291,6 +291,9 @@
/* Define if you want 256-color support */
#undef USE_256_COLORS
@@ -12,7 +12,7 @@
# undef _ALL_SOURCE
--- configure
+++ configure
-@@ -740,6 +740,7 @@
+@@ -734,6 +734,7 @@
enable_assert
enable_warnings
enable_256_color
@@ -20,7 +20,7 @@
enable_unicode3
enable_combining
enable_xft
-@@ -1421,6 +1422,7 @@
+@@ -1408,6 +1409,7 @@
--enable-assert enable assertions
--enable-warnings turn on g++ warnings
--enable-256-color enable 256-color support
@@ -28,7 +28,7 @@
--enable-unicode3 use 21 instead of 16 bits to represent unicode characters
--enable-combining enable composition of base and combining characters
--enable-xft enable xft support on systems that have it
-@@ -5283,6 +5285,21 @@
+@@ -5129,6 +5131,21 @@
fi
@@ -52,7 +52,7 @@
then :
--- configure.ac
+++ configure.ac
-@@ -203,6 +203,16 @@
+@@ -197,6 +197,16 @@
AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support)
fi
@@ -82,7 +82,7 @@
You can specify this and then disable options you do not like by
*following* this with the appropriate "--disable-..." arguments, or
-@@ -251,6 +251,20 @@
+@@ -239,6 +239,20 @@
It also results in higher memory usage and can slow down urxvt
dramatically when more than six fonts are in use by a terminal
@@ -129,7 +129,7 @@
color -= minCOLOR;
#if XFT
-@@ -3906,7 +3906,7 @@
+@@ -3915,7 +3915,7 @@
{
unsigned int i;
short rendset;
@@ -138,7 +138,7 @@
if (nargs == 0)
{
-@@ -4012,6 +4012,20 @@
+@@ -4021,6 +4021,20 @@
break;
case 38: // set fg color, ISO 8613-6
@@ -159,7 +159,7 @@
case 48: // set bg color, ISO 8613-6
{
unsigned int fgbg = arg[i] == 38 ? Color_fg : Color_bg;
-@@ -4024,6 +4038,14 @@
+@@ -4033,6 +4047,14 @@
scr_color (idx, fgbg);
}
@@ -176,7 +176,7 @@
unsigned int r = arg[i + 2];
--- src/init.C
+++ src/init.C
-@@ -1110,7 +1110,7 @@
+@@ -1121,7 +1121,7 @@
for (i = 0; i < NRS_COLORS; i++)
if (const char *name = rs[Rs_color + i])
@@ -185,7 +185,7 @@
/*
* get scrollBar shadow colors
-@@ -1119,13 +1119,13 @@
+@@ -1130,13 +1130,13 @@
* from the fvwm window manager.
*/
#ifdef RXVT_SCROLLBAR
@@ -202,7 +202,7 @@
rgba (
min ((int)rgba::MAX_CC, max (cscroll.r / 5, cscroll.r) * 7 / 5),
min ((int)rgba::MAX_CC, max (cscroll.g / 5, cscroll.g) * 7 / 5),
-@@ -1367,8 +1367,8 @@
+@@ -1378,8 +1378,8 @@
window_calc (0, 0);
/* sub-window placement & size in rxvt_term::resize_all_windows () */
@@ -213,7 +213,7 @@
attributes.colormap = cmap;
top = XCreateWindow (dpy, parent,
-@@ -1465,8 +1465,8 @@
+@@ -1476,8 +1476,8 @@
window_vt_x, window_vt_y,
vt_width, vt_height,
0,
@@ -224,7 +224,7 @@
attributes.bit_gravity = NorthWestGravity;
XChangeWindowAttributes (dpy, vt, CWBitGravity, &attributes);
-@@ -1483,8 +1483,8 @@
+@@ -1494,8 +1494,8 @@
vt_ev.start (display, vt);
/* graphics context for the vt window */
@@ -237,7 +237,7 @@
gc = XCreateGC (dpy, vt,
--- src/main.C
+++ src/main.C
-@@ -248,10 +248,10 @@
+@@ -251,10 +251,10 @@
for (int i = 0; i < TOTAL_COLORS; i++)
if (ISSET_PIXCOLOR (i))
{
@@ -250,7 +250,7 @@
#endif
}
-@@ -965,8 +965,8 @@
+@@ -970,8 +970,8 @@
}
}
@@ -261,7 +261,7 @@
done:
/*TODO: handle Color_BD, scrollbar background, etc. */
-@@ -983,12 +983,12 @@
+@@ -988,12 +988,12 @@
XColor fg, bg;
(ISSET_PIXCOLOR (Color_pointer_fg)
@@ -278,7 +278,7 @@
XRecolorCursor (dpy, TermWin_cursor, &fg, &bg);
}
-@@ -1007,14 +1007,14 @@
+@@ -1012,14 +1012,14 @@
char *env_colorfgbg;
for (i = Color_Black; i <= Color_White; i++)
@@ -295,7 +295,7 @@
{
sprintf (bstr, "%d", i - Color_Black);
#if HAVE_IMG
-@@ -1043,8 +1043,8 @@
+@@ -1048,8 +1048,8 @@
void
rxvt_term::alias_color (int dst, int src)
{
@@ -306,7 +306,7 @@
}
#ifdef SMART_RESIZE
-@@ -1198,8 +1198,8 @@
+@@ -1203,8 +1203,8 @@
void
rxvt_term::im_set_color (unsigned long &fg, unsigned long &bg)
{
@@ -344,7 +344,7 @@
XFillRectangle (disp, d, gc, x, y, w, h);
#endif
}
-@@ -342,7 +342,7 @@
+@@ -343,7 +343,7 @@
clear_rect (d, x, y, term->fwidth * len, term->fheight, bg);
@@ -353,7 +353,7 @@
while (len)
{
-@@ -1053,7 +1053,7 @@
+@@ -1065,7 +1065,7 @@
int base = ascent; // sorry, incorrect: term->fbase;
XGCValues v;
@@ -362,7 +362,7 @@
v.font = f->fid;
if (enc2b)
-@@ -1062,7 +1062,7 @@
+@@ -1074,7 +1074,7 @@
if (bg == Color_bg && !slow)
{
@@ -371,7 +371,7 @@
XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
XDrawImageString16 (disp, d, gc, x, y + base, xc, len);
}
-@@ -1094,7 +1094,7 @@
+@@ -1106,7 +1106,7 @@
if (bg == Color_bg && !slow)
{
@@ -380,7 +380,7 @@
XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
XDrawImageString (disp, d, gc, x, y + base, xc, len);
}
-@@ -1417,7 +1417,7 @@
+@@ -1528,7 +1528,7 @@
if (term->bg_img
&& (bg == Color_transparent || bg == Color_bg
@@ -389,7 +389,7 @@
{
int src_x = x, src_y = y;
-@@ -1454,7 +1454,7 @@
+@@ -1565,7 +1565,7 @@
if (dst)
{
@@ -398,7 +398,7 @@
// dst can only be set when bg >= 0
XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h);
-@@ -1462,9 +1462,9 @@
+@@ -1573,9 +1573,9 @@
}
else
#endif
@@ -410,7 +410,7 @@
XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
}
else
-@@ -1473,7 +1473,7 @@
+@@ -1584,7 +1584,7 @@
else
{
clear_rect (d, x, y, w, h, bg);
@@ -436,7 +436,7 @@
#endif
--- src/rxvt.h
+++ src/rxvt.h
-@@ -39,7 +39,11 @@
+@@ -41,7 +41,11 @@
#else
typedef uint16_t text_t; // saves lots of memory
#endif
@@ -448,7 +448,7 @@
typedef int32_t tlen_t; // was int16_t, but this results in smaller code and memory use
typedef int32_t tlen_t_; // specifically for use in the line_t structure
-@@ -342,43 +346,52 @@
+@@ -351,43 +355,52 @@
#define RS_None 0
// GET_BGATTR depends on RS_fgShift > RS_bgShift
@@ -523,7 +523,7 @@
#define DEFAULT_RSTYLE (RS_None | (Color_fg << RS_fgShift) | (Color_bg << RS_bgShift))
#define OVERLAY_RSTYLE (RS_None | (Color_Black << RS_fgShift) | (Color_Yellow << RS_bgShift))
-@@ -528,7 +541,9 @@
+@@ -538,7 +551,9 @@
#endif
};
@@ -534,7 +534,7 @@
# define Color_Bits 9 // 0 .. maxTermCOLOR24
#else
# define Color_Bits 8 // 0 .. maxTermCOLOR24
-@@ -664,21 +679,21 @@
+@@ -674,21 +689,21 @@
#define ROW(n) ROW_of (this, n)
/* how to build & extract colors and attributes */
@@ -567,7 +567,7 @@
#define PIXCOLOR_NAME(idx) rs[Rs_color + (idx)]
#define ISSET_PIXCOLOR(idx) (!!rs[Rs_color + (idx)])
-@@ -1413,7 +1428,12 @@
+@@ -1488,7 +1503,12 @@
void scr_swap_screen () noexcept;
void scr_change_screen (int scrn);
void scr_color (unsigned int color, int fgbg) noexcept;
@@ -602,7 +602,7 @@
BOOT:
{
sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1));
-@@ -1105,43 +1117,43 @@
+@@ -1107,43 +1119,43 @@
OUTPUT:
RETVAL
@@ -658,7 +658,7 @@
CODE:
{
if (!IN_RANGE_EXC (new_value, 0, RS_customCount))
-@@ -1555,8 +1567,8 @@
+@@ -1563,8 +1575,8 @@
THIS->vt_emask_perl |= emask;
THIS->vt_select_input ();
@@ -669,7 +669,7 @@
CODE:
RETVAL = THIS->rstyle;
THIS->rstyle = new_rstyle;
-@@ -2043,10 +2055,10 @@
+@@ -2050,10 +2062,10 @@
RETVAL
void
@@ -682,7 +682,7 @@
void
rxvt_term::scr_bell ()
-@@ -2112,7 +2124,7 @@
+@@ -2119,7 +2131,7 @@
}
SV *
@@ -691,7 +691,7 @@
CODE:
{
overlay *o = new overlay (THIS, x, y, w, h, rstyle, border);
-@@ -2211,8 +2223,8 @@
+@@ -2218,8 +2230,8 @@
XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height)
C_ARGS: term->dpy, (Window)parent,
x, y, width, height, 0,
@@ -702,7 +702,7 @@
#endif
-@@ -2346,7 +2358,7 @@
+@@ -2353,7 +2365,7 @@
img->reify ()
->replace (img);
diff --git a/PKGBUILD b/PKGBUILD
index 06056ee991c3..31c957fc9f9a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: mrdotx <klassiker@gmx.de>
_pkgname=rxvt-unicode
pkgname=rxvt-unicode-truecolor-wide-glyphs
-pkgver=9.26
-pkgrel=2
+pkgver=9.30
+pkgrel=1
pkgdesc='Unicode enabled rxvt-clone terminal emulator (urxvt) with true color, enhanced glyphs and improved font rendering support'
arch=('i686' 'x86_64')
url='http://software.schmorp.de/pkg/rxvt-unicode.html'
@@ -12,6 +12,7 @@ depends=(
'libxt'
'perl'
'startup-notification'
+ 'libptytty'
)
optdepends=('gtk2-perl: to use the urxvt-tabbed')
provides=(
@@ -28,7 +29,7 @@ conflicts=(
'urxvt-perls-git'
)
source=(
- http://dist.schmorp.de/rxvt-unicode/Attic/$_pkgname-$pkgver.tar.bz2
+ http://dist.schmorp.de/rxvt-unicode/$_pkgname-$pkgver.tar.bz2
'urxvt.desktop'
'urxvtc.desktop'
'urxvt-tabbed.desktop'
@@ -38,31 +39,44 @@ source=(
'enable-wide-glyphs.patch'
'improve-font-rendering.patch'
)
-sha1sums=('d325d8cdea6bcb8e0b8b219b8451bf5c690b6c62'
+sha1sums=('700265a255eedf0f553cadfe5484bf71f8fb74c2'
'b5a4507f85ebb7bac589db2e07d9bc40106720d9'
'62c4ffecfce6967def394dd4d418b68652372ea2'
'cd204d608d114d39c80331efe0af0231ad6b7e18'
'a61366659c73bd551fa99a8415bb71e033897598'
'9883d0c31b45f8521829ea6a2041f2e9eb7abe6a'
- '560097c0d6377461fcbe4c109f3113a6bcb38982'
- 'c5ee4a50902d8c8d278938b080464a16d2c6af56'
- '772b62071d73c0021adf334f037b95ef13d34317')
+ 'b5a239179a6da062bcc9c5a36e870387080372d2'
+ '5c11265e5c54fdc7e005aa0a3c55de3374f15a73'
+ 'a62225c18458ed9d1743699ef98f41d3d157f145')
prepare() {
+ ################################################################
+ # #
+ # If you have problems with character rendering, #
+ # try to install libxft-bgra from the aur. #
+ # #
+ ################################################################
+
cd $_pkgname-$pkgver
- # The repo with original 24-bit-color.patch is no longer available:
+ # the repo with original 24-bit-color.patch is no longer available:
# https://gist.githubusercontent.com/dan-santana/63271adf12171e0fc0bc/raw/70c6343d1c0b3bca0aba4f587ed501e6cbd98d00/24-bit-color.patch
- # I have rewritten the patch to work with version 9.26.
- # If someone has a better solution, please contact me!
+ # patch rewritten to work with version ≥ 9.26
patch -p0 -i ../24-bit-color.patch
- # If you have problems with character rendering, try installing libxft-bgra from aur.
# https://aur.archlinux.org/packages/rxvt-unicode-cvs-patched-wideglyphs
patch -p0 -i ../enable-wide-glyphs.patch
- # https://aur.archlinux.org/packages/rxvt-unicode-improve-font-rendering
+ # https://gist.githubusercontent.com/emonkak/28bbc5474697695321452b6d9bf1d0bd/raw/a888c37ae10376598e663cf989132648f89219c0/rxvt-unicode-9.22-improve-font-endering.patch
+ # patch rewritten to work with version ≥ 9.29
patch -p0 -i ../improve-font-rendering.patch
+
+ ################################################################
+ # #
+ # If someone has better solutions for the rewritten patches, #
+ # please contact me! #
+ # #
+ ################################################################
}
build() {
@@ -80,7 +94,6 @@ build() {
--enable-frills \
--disable-iso14755 \
--disable-keepscrolling \
- --enable-lastlog \
--enable-mousewheel \
--disable-next-scroll \
--enable-perl \
@@ -94,9 +107,7 @@ build() {
--enable-text-blink \
--enable-transparency \
--enable-unicode3 \
- --enable-utmp \
--enable-wide-glyphs \
- --enable-wtmp \
--enable-xft \
--enable-xim \
--disable-xterm-scroll
diff --git a/enable-wide-glyphs.patch b/enable-wide-glyphs.patch
index 4773bbb23e65..cf49b06e23c6 100644
--- a/enable-wide-glyphs.patch
+++ b/enable-wide-glyphs.patch
@@ -12,7 +12,7 @@
--- configure
+++ configure
-@@ -745,6 +745,7 @@
+@@ -739,6 +739,7 @@
enable_combining
enable_xft
enable_font_styles
@@ -20,7 +20,7 @@
enable_pixbuf
enable_startup_notification
enable_transparency
-@@ -1427,6 +1428,7 @@
+@@ -1414,6 +1415,7 @@
--enable-combining enable composition of base and combining characters
--enable-xft enable xft support on systems that have it
--enable-font-styles enable bold and italic support
@@ -28,7 +28,7 @@
--enable-pixbuf enable integration with gdk-pixbuf for background images
--enable-startup-notification enable freedesktop startup notification support
--enable-transparency enable transparent backgrounds
-@@ -5184,6 +5186,7 @@
+@@ -5025,6 +5027,7 @@
support_8bitctrls=no
support_iso14755=no
support_styles=no
@@ -36,7 +36,7 @@
support_perl=no
codesets=
fi
-@@ -5212,6 +5215,7 @@
+@@ -5050,6 +5053,7 @@
#support_8bitctrls=yes
support_iso14755=yes
support_styles=yes
@@ -44,7 +44,7 @@
support_perl=yes
codesets=all
fi
-@@ -5336,6 +5340,14 @@
+@@ -5182,6 +5186,14 @@
fi
@@ -59,21 +59,21 @@
# Check whether --enable-pixbuf was given.
if test ${enable_pixbuf+y}
then :
-@@ -8164,6 +8176,11 @@
- printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
+@@ -7727,6 +7739,11 @@
+ printf "%s\n" "#define MOUSE_SLIP_WHEELING 1" >>confdefs.h
fi
+if test x$support_wide_glyphs = xyes; then
+
-+$as_echo "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h
++printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h
+
+fi
- ac_fn_cxx_check_func "$LINENO" "isastream" "ac_cv_func_isastream"
- if test "x$ac_cv_func_isastream" = xyes
- then :
+
+ scrolltypes=plain
+
--- configure.ac
+++ configure.ac
-@@ -134,6 +134,7 @@
+@@ -123,6 +123,7 @@
support_8bitctrls=no
support_iso14755=no
support_styles=no
@@ -81,7 +81,7 @@
support_perl=no
codesets=
fi
-@@ -162,6 +163,7 @@
+@@ -148,6 +149,7 @@
#support_8bitctrls=yes
support_iso14755=yes
support_styles=yes
@@ -89,7 +89,7 @@
support_perl=yes
codesets=all
fi
-@@ -237,6 +239,12 @@
+@@ -231,6 +233,12 @@
support_styles=$enableval
fi])
@@ -102,7 +102,7 @@
AC_ARG_ENABLE(pixbuf,
[ --enable-pixbuf enable integration with gdk-pixbuf for background images],
[if test x$enableval = xyes -o x$enableval = xno; then
-@@ -660,6 +668,9 @@
+@@ -653,6 +661,9 @@
if test x$support_styles = xyes; then
AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
fi
@@ -134,7 +134,7 @@
case '\t':
case ZERO_WIDTH_CHAR:
case NOCHAR:
-@@ -1026,8 +1027,10 @@
+@@ -1038,8 +1039,10 @@
careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw;
@@ -145,9 +145,9 @@
return true;
}
-@@ -1345,12 +1348,14 @@
+@@ -1410,12 +1413,14 @@
- careful = g.x > 0 || w > prop->width * wcw;
+ careful = g.x > 0 || w > cwidth;
+#if !ENABLE_WIDE_GLYPHS
if (careful && !OVERLAP_OK (w, wcw, prop))
@@ -160,17 +160,17 @@
return true;
}
-@@ -1395,6 +1400,10 @@
+@@ -1496,6 +1501,10 @@
ep->glyph = glyph;
- ep->x = x_ + (cwidth - extents.xOff >> 1);
+ ep->x = x_;
+#if ENABLE_WIDE_GLYPHS
+ /* Left-align to bounding box, do not overlap to the left. */
+ max_it(ep->x, x_);
+#endif
ep->y = y_ + ascent;
- if (extents.xOff == 0)
+ // the xft font cell might differ from the terminal font cell,
--- src/screen.C
+++ src/screen.C
@@ -975,7 +975,61 @@
@@ -252,7 +252,7 @@
// force redraw before "careful" characters to avoid pixel droppings
--- src/xdefaults.C
+++ src/xdefaults.C
-@@ -294,6 +294,9 @@
+@@ -298,6 +298,9 @@
#if ENABLE_STYLES
"styles,"
#endif
diff --git a/improve-font-rendering.patch b/improve-font-rendering.patch
index 460aca6ca6da..daac7b6838d8 100644
--- a/improve-font-rendering.patch
+++ b/improve-font-rendering.patch
@@ -1,13 +1,16 @@
--- src/rxvtfont.C
+++ src/rxvtfont.C
-@@ -1226,92 +1226,63 @@
+@@ -1253,98 +1253,60 @@
return false;
int ftheight = 0;
- bool success = true;
--
++ p = FcPatternDuplicate (match);
++ f = XftFontOpenPattern (disp, p);
+
- for (;;)
-- {
++ if (!f)
+ {
- p = FcPatternDuplicate (match);
- f = XftFontOpenPattern (disp, p);
-
@@ -17,88 +20,85 @@
- success = false;
- break;
- }
-
+-
- FT_Face face = XftLockFace (f);
-+ p = FcPatternDuplicate (match);
-+ f = XftFontOpenPattern (disp, p);
-
+-
+- // fuck me plenty: XftLockFace can actually return 0. try not to crash.
+- // we also assume blindly that if the first lock succeeeds, then subsequent
+- // locks will also succeed.
+- if (!face)
+- {
+- XftFontClose (disp, f);
+- success = false;
+- break;
+- }
+-
- ascent = (face->size->metrics.ascender + 63) >> 6;
- descent = (-face->size->metrics.descender + 63) >> 6;
- height = max (ascent + descent, (face->size->metrics.height + 63) >> 6);
- width = 0;
-
- bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
-+ if (!f)
-+ {
+-
+- XftUnlockFace (f);
+-
+- int glheight = height;
+ FcPatternDestroy (p);
+ return false;
+ }
-- XftUnlockFace (f);
-+ FT_Face face = XftLockFace (f);
-
-- int glheight = height;
-+ ascent = f->ascent;
-+ descent = f->descent;
-+ height = max (ascent + descent, f->height);
-+ width = 0;
-
- for (uint16_t *t = extent_test_chars; t < extent_test_chars + ecb_array_length (extent_test_chars); t++)
- {
- FcChar16 ch = *t;
-+ bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
++ FT_Face face = XftLockFace (f);
- if (cs != CS_UNICODE
- && ch > 0x100
- && FROM_UNICODE (cs, ch) == NOCHAR)
- continue;
-+ XftUnlockFace (f);
++ ascent = f->ascent;
++ descent = f->descent;
++ height = max (ascent + descent, f->height);
++ width = 0;
- // ignore characters we wouldn't use anyways
- bool careful;
- if (!has_char (*t, &prop, careful))
- continue;
++ bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
+
+- XGlyphInfo g;
+- XftTextExtents16 (disp, f, &ch, 1, &g);
++ XftUnlockFace (f);
+
+- g.width -= g.x;
+ for (uint16_t *t = extent_test_chars; t < extent_test_chars + ecb_array_length (extent_test_chars); t++)
+ {
+ FcChar16 ch = *t;
-- XGlyphInfo g;
-- XftTextExtents16 (disp, f, &ch, 1, &g);
+- int wcw = WCWIDTH (ch);
+- if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
+ if (cs != CS_UNICODE
+ && ch > 0x100
+ && FROM_UNICODE (cs, ch) == NOCHAR)
+ continue;
-
-- g.width -= g.x;
++
+ // ignore characters we wouldn't use anyways
+ bool careful;
+ if (!has_char (*t, &prop, careful))
+ continue;
-- int wcw = WCWIDTH (ch);
-- if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
-+ XGlyphInfo g;
-+ XftTextExtents16 (disp, f, &ch, 1, &g);
-
- 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;
- }
-+ g.width -= g.x;
++ XGlyphInfo g;
++ XftTextExtents16 (disp, f, &ch, 1, &g);
- if (!width)
- {
-- rxvt_warn ("unable to calculate font width for '%s', ignoring.\n", name);
-+ int wcw = WCWIDTH (ch);
-+ if (wcw > 1) g.xOff = g.xOff / wcw;
-
-- XftFontClose (disp, f);
-- f = 0;
-+ if (width < g.xOff ) width = g.xOff;
-+ if (height < g.height) height = g.height;
-+ }
-
-- success = false;
+- rxvt_warn ("unable to calculate font width for '%s', using max_advance_width.\n", name);
+- width = f->max_advance_width;
- break;
- }
-
@@ -107,7 +107,7 @@
- || height <= 2
- || !scalable)
- break;
-+ bool success = true;
++ g.width -= g.x;
- if (ftheight)
- {
@@ -115,7 +115,13 @@
- if (height > prop.height + 1) ftheight++;
- if (height > prop.height + 2) ftheight++;
- if (height > prop.height + 3) ftheight++;
--
++ int wcw = WCWIDTH (ch);
++ if (wcw > 1) g.xOff = g.xOff / wcw;
++ if (width < g.xOff ) width = g.xOff;
++ if (height < g.height) height = g.height;
++ }
++ bool success = true;
+
- ftheight -= height - prop.height;
- }
- else
@@ -133,15 +139,15 @@
}
FcPatternDestroy (match);
-@@ -1404,7 +1375,7 @@
+@@ -1505,7 +1467,7 @@
/* Left-align to bounding box, do not overlap to the left. */
max_it(ep->x, x_);
#endif
- ep->y = y_ + ascent;
+ ep->y = y_ + term->fbase + (term->lineSpace >> 1);
- if (extents.xOff == 0)
- ep->x = x_ + cwidth;
+ // the xft font cell might differ from the terminal font cell,
+ // in which case we use the average between the two.
--- src/screen.C
+++ src/screen.C
@@ -2538,8 +2538,8 @@