mirror of
https://github.com/gryf/gryf-overlay.git
synced 2026-04-11 17:43:34 +02:00
Added experimental build for urxvt 9.26.
This commit is contained in:
@@ -0,0 +1,271 @@
|
||||
diff -ur rxvt-unicode-9.26/config.h.in rxvt-unicode-9.26_wide/config.h.in
|
||||
--- rxvt-unicode-9.26/config.h.in 2020-01-22 14:41:54.000000000 +0100
|
||||
+++ rxvt-unicode-9.26_wide/config.h.in 2021-07-13 19:50:20.006549931 +0200
|
||||
@@ -18,6 +18,9 @@
|
||||
/* Define if you want your background to use the parent window background */
|
||||
#undef ENABLE_TRANSPARENCY
|
||||
|
||||
+/* Define if you want to display wide glyphs */
|
||||
+#undef ENABLE_WIDE_GLYPHS
|
||||
+
|
||||
/* Define if you want european extended codesets */
|
||||
#undef ENCODING_EU
|
||||
|
||||
diff -ur rxvt-unicode-9.26/configure rxvt-unicode-9.26_wide/configure
|
||||
--- rxvt-unicode-9.26/configure 2021-05-14 15:50:48.000000000 +0200
|
||||
+++ rxvt-unicode-9.26_wide/configure 2021-07-13 20:12:01.802581704 +0200
|
||||
@@ -744,6 +744,7 @@
|
||||
enable_combining
|
||||
enable_xft
|
||||
enable_font_styles
|
||||
+enable_wide_glyphs
|
||||
enable_pixbuf
|
||||
enable_startup_notification
|
||||
enable_transparency
|
||||
@@ -1425,6 +1426,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
|
||||
+ --enable-wide-glyphs enable displaying of wide glyphs
|
||||
--enable-pixbuf enable integration with gdk-pixbuf for background images
|
||||
--enable-startup-notification enable freedesktop startup notification support
|
||||
--enable-transparency enable transparent backgrounds
|
||||
@@ -5182,6 +5184,7 @@
|
||||
support_8bitctrls=no
|
||||
support_iso14755=no
|
||||
support_styles=no
|
||||
+ support_wide_glyphs=no
|
||||
support_perl=no
|
||||
codesets=
|
||||
fi
|
||||
@@ -5210,6 +5213,7 @@
|
||||
#support_8bitctrls=yes
|
||||
support_iso14755=yes
|
||||
support_styles=yes
|
||||
+ support_wide_glyphs=yes
|
||||
support_perl=yes
|
||||
codesets=all
|
||||
fi
|
||||
@@ -5319,6 +5323,14 @@
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-wide-glyphs was given.
|
||||
+if test "${enable_wide_glyphs+set}" = set; then :
|
||||
+ enableval=$enable_wide_glyphs; if test x$enableval = xyes -o x$enableval = xno; then
|
||||
+ support_wide_glyphs=$enableval
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+
|
||||
# Check whether --enable-pixbuf was given.
|
||||
if test ${enable_pixbuf+y}
|
||||
then :
|
||||
@@ -8542,6 +8554,11 @@
|
||||
printf "%s\n" "#define ISO_14755 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
+if test x$support_wide_glyphs = xyes; then
|
||||
+
|
||||
+printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
if test x$support_8bitctrls = xyes; then
|
||||
|
||||
printf "%s\n" "#define EIGHT_BIT_CONTROLS 1" >>confdefs.h
|
||||
diff -ur rxvt-unicode-9.26/configure.ac rxvt-unicode-9.26_wide/configure.ac
|
||||
--- rxvt-unicode-9.26/configure.ac 2021-05-13 21:40:55.000000000 +0200
|
||||
+++ rxvt-unicode-9.26_wide/configure.ac 2021-07-13 19:55:10.702557026 +0200
|
||||
@@ -134,6 +134,7 @@
|
||||
support_8bitctrls=no
|
||||
support_iso14755=no
|
||||
support_styles=no
|
||||
+ support_wide_glyphs=no
|
||||
support_perl=no
|
||||
codesets=
|
||||
fi
|
||||
@@ -162,6 +163,7 @@
|
||||
#support_8bitctrls=yes
|
||||
support_iso14755=yes
|
||||
support_styles=yes
|
||||
+ support_wide_glyphs=yes
|
||||
support_perl=yes
|
||||
codesets=all
|
||||
fi
|
||||
@@ -227,6 +229,12 @@
|
||||
support_styles=$enableval
|
||||
fi])
|
||||
|
||||
+AC_ARG_ENABLE(wide-glyphs,
|
||||
+ [ --enable-wide-glyphs enable displaying of wide glyphs],
|
||||
+ [if test x$enableval = xyes -o x$enableval = xno; then
|
||||
+ support_wide_glyphs=$enableval
|
||||
+ fi])
|
||||
+
|
||||
AC_ARG_ENABLE(pixbuf,
|
||||
[ --enable-pixbuf enable integration with gdk-pixbuf for background images],
|
||||
[if test x$enableval = xyes -o x$enableval = xno; then
|
||||
@@ -650,6 +658,9 @@
|
||||
if test x$support_styles = xyes; then
|
||||
AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
|
||||
fi
|
||||
+if test x$support_wide_glyphs = xyes; then
|
||||
+ AC_DEFINE(ENABLE_WIDE_GLYPHS, 1, Define if you want to display wide glyphs)
|
||||
+fi
|
||||
if test x$support_iso14755 = xyes; then
|
||||
AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
|
||||
fi
|
||||
diff -ur rxvt-unicode-9.26/src/command.C rxvt-unicode-9.26_wide/src/command.C
|
||||
--- rxvt-unicode-9.26/src/command.C 2021-05-13 21:40:55.000000000 +0200
|
||||
+++ rxvt-unicode-9.26_wide/src/command.C 2021-07-13 19:55:52.990558058 +0200
|
||||
@@ -237,7 +237,9 @@
|
||||
# endif
|
||||
scr_overlay_set (11, y + 1, ch, r);
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (WCWIDTH (ch) >= 2)
|
||||
+#endif
|
||||
scr_overlay_set (12, y + 1, NOCHAR, r);
|
||||
}
|
||||
|
||||
diff -ur rxvt-unicode-9.26/src/rxvtfont.C rxvt-unicode-9.26_wide/src/rxvtfont.C
|
||||
--- rxvt-unicode-9.26/src/rxvtfont.C 2020-01-20 10:19:11.000000000 +0100
|
||||
+++ rxvt-unicode-9.26_wide/src/rxvtfont.C 2021-07-13 19:58:46.890562302 +0200
|
||||
@@ -471,6 +471,7 @@
|
||||
else
|
||||
switch (t)
|
||||
{
|
||||
+ case ' ':
|
||||
case '\t':
|
||||
case ZERO_WIDTH_CHAR:
|
||||
case NOCHAR:
|
||||
@@ -1026,8 +1027,10 @@
|
||||
|
||||
careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw;
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (careful && !OVERLAP_OK (w, wcw, prop))
|
||||
return false;
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1345,12 +1348,14 @@
|
||||
|
||||
careful = g.x > 0 || w > prop->width * wcw;
|
||||
|
||||
+#if !ENABLE_WIDE_GLYPHS
|
||||
if (careful && !OVERLAP_OK (w, wcw, prop))
|
||||
return false;
|
||||
|
||||
// this weeds out _totally_ broken fonts, or glyphs
|
||||
if (!OVERLAP_OK (g.xOff, wcw, prop))
|
||||
return false;
|
||||
+#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1395,6 +1400,10 @@
|
||||
|
||||
ep->glyph = glyph;
|
||||
ep->x = x_ + (cwidth - extents.xOff >> 1);
|
||||
+#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)
|
||||
diff -ur rxvt-unicode-9.26/src/screen.C rxvt-unicode-9.26_wide/src/screen.C
|
||||
--- rxvt-unicode-9.26/src/screen.C 2021-05-13 21:40:55.000000000 +0200
|
||||
+++ rxvt-unicode-9.26_wide/src/screen.C 2021-07-13 20:01:29.694566276 +0200
|
||||
@@ -936,7 +936,61 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+ rend_t rend;
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ // Re-use previous font for space characters.
|
||||
+ // This allows for better display of wider chars with regard to
|
||||
+ // backtracking (which uses RS_SAME).
|
||||
+ if (c != ' ')
|
||||
+ {
|
||||
+#endif
|
||||
+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Code taken from ENABLE_COMBINING - might get refactored.
|
||||
+ line_t *linep;
|
||||
+ text_t *tp;
|
||||
+ rend_t *rp = NULL;
|
||||
+
|
||||
+ if (screen.cur.col > 0)
|
||||
+ {
|
||||
+ linep = line;
|
||||
+ tp = line->t + screen.cur.col - 1;
|
||||
+ rp = line->r + screen.cur.col - 1;
|
||||
+ }
|
||||
+ else if (screen.cur.row > 0
|
||||
+ && ROW(screen.cur.row - 1).is_longer ())
|
||||
+ {
|
||||
+ linep = &ROW(screen.cur.row - 1);
|
||||
+ tp = linep->t + ncol - 1;
|
||||
+ rp = linep->r + ncol - 1;
|
||||
+ }
|
||||
+
|
||||
+ if (rp)
|
||||
+ {
|
||||
+ // XXX: this font does not show up in iso-14755 mode for the space!?
|
||||
+ if (*tp == NOCHAR)
|
||||
+ {
|
||||
+ while (*tp == NOCHAR && tp > linep->t)
|
||||
+ tp--, rp--;
|
||||
+
|
||||
+ // first try to find a precomposed character
|
||||
+ unicode_t n = rxvt_compose (*tp, c);
|
||||
+ if (n == NOCHAR)
|
||||
+ n = rxvt_composite.compose (*tp, c);
|
||||
+
|
||||
+ *tp = n;
|
||||
+ *rp = SET_FONT (*rp, FONTSET (*rp)->find_font (*tp));
|
||||
+ }
|
||||
+ rend = SET_FONT (rstyle, GET_FONT(*rp));
|
||||
+ }
|
||||
+ else
|
||||
+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
// if the character doesn't fit into the remaining columns...
|
||||
if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width))
|
||||
@@ -2395,7 +2449,12 @@
|
||||
text--, count++, xpixel -= fwidth;
|
||||
|
||||
// force redraw after "careful" characters to avoid pixel droppings
|
||||
- for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++)
|
||||
+ for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ // But not for spaces.
|
||||
+ && stp[col + i + 1] != ' '
|
||||
+#endif
|
||||
+ ; i++)
|
||||
drp[col + i + 1] = srp[col + i + 1] ^ RS_redraw;
|
||||
|
||||
// force redraw before "careful" characters to avoid pixel droppings
|
||||
diff -ur rxvt-unicode-9.26/src/xdefaults.C rxvt-unicode-9.26_wide/src/xdefaults.C
|
||||
--- rxvt-unicode-9.26/src/xdefaults.C 2019-09-17 22:38:30.000000000 +0200
|
||||
+++ rxvt-unicode-9.26_wide/src/xdefaults.C 2021-07-13 20:02:34.230567851 +0200
|
||||
@@ -294,6 +294,9 @@
|
||||
#if ENABLE_STYLES
|
||||
"styles,"
|
||||
#endif
|
||||
+#if ENABLE_WIDE_GLYPHS
|
||||
+ "wide-glyphs,"
|
||||
+#endif
|
||||
#if ENABLE_COMBINING
|
||||
"combining,"
|
||||
#endif
|
||||
Reference in New Issue
Block a user