[wiki] [sites] [st][vertcenter] update to head || mujo

From: <git_AT_suckless.org>
Date: Tue, 20 Mar 2018 08:36:40 +0100

commit 57bba3b098d32d4d3fb87ec02a27d19a4f56c9f8
Author: mujo <mujo_AT_sdf.org>
Date: Tue Mar 20 00:36:07 2018 -0700

    [st][vertcenter] update to head

diff --git a/st.suckless.org/patches/vertcenter/index.md b/st.suckless.org/patches/vertcenter/index.md
index 2c872740..d46fbadd 100644
--- a/st.suckless.org/patches/vertcenter/index.md
+++ b/st.suckless.org/patches/vertcenter/index.md
_AT_@ -19,6 +19,7 @@ After:
  * [st-vertcenter-20160819-023225e.diff](st-vertcenter-20160819-023225e.diff)
  * [st-vertcenter-20170601-5a10aca.diff](st-vertcenter-20170601-5a10aca.diff)
  * [st-vertcenter-20171207-0ac685f.diff](st-vertcenter-20171207-0ac685f.diff)
+ * [st-vertcenter-20180320-6ac8c8a.diff](st-vertcenter-20180320-6ac8c8a.diff)
 
 ## Authors
 
diff --git a/st.suckless.org/patches/vertcenter/st-vertcenter-20180320-6ac8c8a.diff b/st.suckless.org/patches/vertcenter/st-vertcenter-20180320-6ac8c8a.diff
new file mode 100644
index 00000000..61f5c253
--- /dev/null
+++ b/st.suckless.org/patches/vertcenter/st-vertcenter-20180320-6ac8c8a.diff
_AT_@ -0,0 +1,51 @@
+--- a/x.c Tue Mar 20 00:28:57 2018
++++ b/x.c Tue Mar 20 00:29:02 2018
+_AT_@ -80,6 +80,7 @@
+ int w, h; /* window width and height */
+ int ch; /* char height */
+ int cw; /* char width */
++ int cyo; /* char y offset */
+ int mode; /* window state/mode flags */
+ int cursor; /* cursor style */
+ } TermWindow;
+_AT_@ -949,6 +950,7 @@
+ /* Setting character width and height. */
+ win.cw = ceilf(dc.font.width * cwscale);
+ win.ch = ceilf(dc.font.height * chscale);
++ win.cyo = ceilf(dc.font.height * (chscale - 1) / 2);
+
+ FcPatternDel(pattern, FC_SLANT);
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
+_AT_@ -1130,7 +1132,7 @@
+ FcCharSet *fccharset;
+ int i, f, numspecs = 0;
+
+- for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
++ for (i = 0, xp = winx, yp = winy + font->ascent + win.cyo; i < len; ++i) {
+ /* Fetch rune and mode for current glyph. */
+ rune = glyphs[i].u;
+ mode = glyphs[i].mode;
+_AT_@ -1155,7 +1157,7 @@
+ font = &dc.bfont;
+ frcflags = FRC_BOLD;
+ }
+- yp = winy + font->ascent;
++ yp = winy + font->ascent + win.cyo;
+ }
+
+ /* Lookup character index with default font. */
+_AT_@ -1371,12 +1373,12 @@
+
+ /* Render underline and strikethrough. */
+ if (base.mode & ATTR_UNDERLINE) {
+- XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1,
++ XftDrawRect(xw.draw, fg, winx, winy + win.cyo + dc.font.ascent + 1,
+ width, 1);
+ }
+
+ if (base.mode & ATTR_STRUCK) {
+- XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3,
++ XftDrawRect(xw.draw, fg, winx, winy + win.cyo + 2 * dc.font.ascent / 3,
+ width, 1);
+ }
+
Received on Tue Mar 20 2018 - 08:36:40 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 20 2018 - 08:48:21 CET