[wiki] [sites] [st][patch][ligatures] Fix ATTR_WRAP attribute handling in layout logic. || Alexander Rogachev

From: <git_AT_suckless.org>
Date: Thu, 16 Nov 2023 18:57:21 +0100

commit 20d453defdb6ae7bb37f644a2e2831cf2097cdbb
Author: Alexander Rogachev <sorryforbadname_AT_gmail.com>
Date: Thu Nov 16 21:59:28 2023 +0400

    [st][patch][ligatures] Fix ATTR_WRAP attribute handling in layout logic.

diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-20230105-0.9.diff
index eeb39d06..f47ac98a 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-20230105-0.9.diff
_AT_@ -312,13 +312,14 @@ index 2a3bd38..9b97075 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-20230105-0.9.diff
index cd545781..9ea80b0a 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-20230105-0.9.diff
_AT_@ -313,13 +313,14 @@ index 27e81d1..9d84793 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-20230105-0.9.diff
index 435e3b4b..688cc6b5 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-20230105-0.9.diff
_AT_@ -314,13 +314,14 @@ index 27e81d1..5d19ed7 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-ringbuffer-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-ringbuffer-20230105-0.9.diff
index cfc20c93..600a18d5 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-ringbuffer-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-alpha-scrollback-ringbuffer-20230105-0.9.diff
_AT_@ -314,13 +314,14 @@ index 27e81d1..5d19ed7 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-boxdraw-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-boxdraw-20230105-0.9.diff
index 20c78f9e..487d037d 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-boxdraw-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-boxdraw-20230105-0.9.diff
_AT_@ -313,13 +313,14 @@ index bf6bbf9..929a59a 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-20230105-0.9.diff
index f3e126d2..8f72dd95 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-20230105-0.9.diff
_AT_@ -312,13 +312,14 @@ index 2a3bd38..e66cf0c 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
diff --git a/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-ringbuffer-20230105-0.9.diff b/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-ringbuffer-20230105-0.9.diff
index bb809434..e9e89453 100644
--- a/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-ringbuffer-20230105-0.9.diff
+++ b/st.suckless.org/patches/ligatures/0.9/st-ligatures-scrollback-ringbuffer-20230105-0.9.diff
_AT_@ -312,13 +312,14 @@ index 9891e91..ec3567a 100644
 + HbTransformData shaped = { 0 };
 +
 + /* Initial values. */
-+ mode = prevmode = glyphs[0].mode;
++ mode = prevmode = glyphs[0].mode & ~ATTR_WRAP;
 + xresetfontsettings(mode, &font, &frcflags);
  
          for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
 - /* Fetch rune and mode for current glyph. */
 - rune = glyphs[i].u;
- mode = glyphs[i].mode;
+- mode = glyphs[i].mode;
++ mode = glyphs[i].mode & ~ATTR_WRAP;
  
                  /* Skip dummy wide-character spacing. */
 - if (mode == ATTR_WDUMMY)
Received on Thu Nov 16 2023 - 18:57:21 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 16 2023 - 19:00:52 CET