-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: a7a3219687707a90abb6f8240b30e33b15471a27:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit a7a3219687707a90abb6f8240b30e33b15471a27
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Thu Jun 17 11:01:57 2021 +0000

     a rare codesize + time optimisation

diff --git a/src/rxvtfont.h b/src/rxvtfont.h

index 60369081a503d5b1c3b4b4b098d54ff643a2cf86..

index ..f4ee997df67c8b62278da0960caf2ebc5039c8c4 100644

--- a/src/rxvtfont.h
+++ b/src/rxvtfont.h
@@ -102,6 +102,15 @@ struct rxvt_fontset
     return min<int> ((fontCount << 1) | 1, find_font_idx (unicode));
   }

+  // find the font containing ' ' - we always assume this is font 1, as
+  // every font should contain space, and font 1 is our base font.
+  // pango assumes this, so it must be correct!
+  int
+  find_space_font ()
+  {
+    return 1 << 1;
+  }
+
 private:
   rxvt_term *term;
   rxvt_fontprop prop;
diff --git a/src/screen.C b/src/screen.C

index ed585c902339f204f5c2fd82164e26c72fab2116..

index ..244054842463921e2dd5e5e25123535dc2fa2aa4 100644

--- a/src/screen.C
+++ b/src/screen.C
@@ -109,7 +109,7 @@ rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend
   l.touch ();

   efs &= ~RS_baseattrMask; // remove italic etc. fontstyles
-  efs = SET_FONT (efs, FONTSET (efs)->find_font (' '));
+  efs = SET_FONT (efs, FONTSET (efs)->find_space_font ());

   text_t *et = l.t + col;
   rend_t *er = l.r + col;
@@ -141,7 +141,7 @@ rxvt_term::scr_kill_char (line_t &l, int col) const noexcept
     col--;

   rend_t rend = l.r[col] & ~RS_baseattrMask;
-  rend = SET_FONT (rend, FONTSET (rend)->find_font (' '));
+  rend = SET_FONT (rend, FONTSET (rend)->find_space_font ());

   l.touch ();

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 13:07:21 2024