reddit / emacs

mu4e missing icons in mode line

sunnyata · 2022-03-11 10:12
I have mu/mu4e 1.6.6 and all-the-icons installed, using the font DejaVu Sans Mono on ubuntu. There are a couple of icons in the mode line that have never shown up for me -- see https://imgur.com/a/NFkb1kc. My font doesn't have them I suppose. How can I work out what they are supposed to be and find a font that has them?
c256 · 2022-03-11 11:14
all-the-icons uses several different fonts, as described in it’s setup documentation: https://github.com/domtronn/all-the-icons.el#resource-fonts If you want “all” the icons, it’s best just to set up those fonts as described on that page. If instead you want to be a bit parsimonious about installing fonts, you can look up those specific numbers to determine which glyphs it’s trying to use, then look through those fonts from all-the-icons (or ask here, probably), and just load that specific font. Worth knowing: there’s not a strict 1-1 mapping of glyphs and fonts; some glyphs appear in different versions in multiple fonts (which is obvious when you think about, for example, Latin alphabet letters, but maybe less so for a file icon or a smile emoji). Part of the appeal of all-the-icons is that it manages the various fonts/settings to get the “good” glyphs from various places. This is especially important with less common glyphs, because there are some fonts that have effectively “fall back” glyphs for rarer characters, so that they can show the user something rather than nothing. The extreme end of this practice is called “tofu”, the white boxes, perhaps with a generic symbol or even a specific hex code, like what is in your screenshot. There are fonts that try hard to avoid this fallback - the Noto (NO TOfu) versions of fonts like DejaVu often do this. Just using a Noto font can get you ‘a’ glyph, while all-the-fonts puts in the extra work to get you a good glyph whenever it can. Hope that helps.
sunnyata · 2022-03-11 12:24
Thanks, but doesn't `M-x all-the-icons-install-fonts` install these fonts?
AblatedSprocket · 2022-03-11 13:08
It does, and I have similar problems with lsp-mode. The only way I managed to get it working was to load specific fonts for specific character code ranges. It's tedious so hopefully someone else has a better solution