repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 4fdaecd650f50c6ccac9e5a646b0d91f47105459:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 4fdaecd650f50c6ccac9e5a646b0d91f47105459
Author: Marc Lehmann 
Date:   Thu Jun 17 11:21:52 2021 +0000

    be more lenient for width

diff --git a/Changes b/Changes
index af5854f25303023daa777a624009d9f4a4028148..
index ..7d6623a6cf8eff84c0aaf0b49a22babd993fbdfb 100644
--- a/Changes
+++ b/Changes
@@ -47,6 +47,10 @@ TODO: think about daemon delaying urxvt client exit.
 TODO: https://github.com/bbidulock/icewm/issues/492 urxvt wrongfully(?) needa configurenotify after mapwindow? also, black border?
 TODO: compose chars should be rendered "in one go" for xft. maybe. possibly.
 TODO: disbale bracketed paste mode option, too amny prorgams abuse it
+	- if urxvt cannot detect a good estimate for font width (because a font does
+          not contain laitn characters at all for example), it will now fall
+          back to xft's max_advance_width, which works well with soem fonts. It
+          currently will warn about this.
 	- do not render variation selectors in the default font as boxes, treat
           them as zero-width characters.
         - unicode characters outside of the BMP can now be rendered even
diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 85d88b3dd5d35ba2ad26994a9941f7856241bbf6..
index ..ef2b15aeff8b18f90982ee74d52097e448d182b7 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1319,12 +1319,8 @@ rxvt_font_xft::load (const rxvt_fontprop &prop, bool force_prop)

       if (!width)
         {
-          rxvt_warn ("unable to calculate font width for '%s', ignoring.\n", name);
-
-          XftFontClose (disp, f);
-          f = 0;
-
-          success = false;
+          rxvt_warn ("unable to calculate font width for '%s', using max_advance_width.\n", name);
+          width = f->max_advance_width;
           break;
         }

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