From: Daniel Hahler <[email protected]>

This make rxvt-unicode recognize Font Awesome [1], which only has glyphs
in the Private Use Areas (PUA) (xf000 - xf2b4), which are not tested by
`rxvt_font_xft::load`.
But is also has a glyph for 0x020 (Space).

This patch fixes the font from being ignored with the following message:

> urxvt: unable to calculate font width for
> 'FontAwesome-4:slant=0:weight=200:minspace=True', ignoring.

Not all glyphs will be displayed by rxvt-unicode (e.g. 0xf243
(fa-battery-1) is too wide still), but most of them will show up.

1: http://fontawesome.io/
---
 src/rxvtfont.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index c56921c..5932f03 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -155,7 +155,7 @@ static const struct rxvt_fallback_font {
 // these characters are used to guess the font height and width
 // pango uses a similar algorithm and doesn't trust the font either.
 static uint16_t extent_test_chars[] = {
-  '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_',
+  ' ', '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_',
   0x00cd, 0x00d5, 0x0114, 0x0177, 0x0643,      // ÍÕĔŷﻙ
   0x304c, 0x672c,                              // が本
 };
-- 
2.10.0


_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to