wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.79k stars 796 forks source link

After first ls(d) in terminal I get "Font Problem" notification #4218

Closed RoninTech closed 1 year ago

RoninTech commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

OS: Linux X11 Linux: Debian GNU/Linux 11 (bullseye) Compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110 Rust version: stable-aarch64-unknown-linux-gnu (default) rustc 1.72.0 (5680fa18f 2023-08-23) Linux RPi4 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux WM: Openbox DE: LXDE

WezTerm version

wezterm 20230828-072823-a103b6d9

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Run wezterm and type lsd and I get a notification popup as shown in the attached screenshot.

If I run: fc-list ':charset=6fef' I get:

/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular

So I added the following to my ~/.config/wezterm/wezterm.lua file:

config.font = wezterm.font_with_fallback({'Firacode Nerd Font Mono','Droid Sans Fallback'})

However the error notification still persists even with the font containing the missing glyph added as a fallback. Is there a way to fix this font error? If not I will just use the warn_about_missing_glyphs = false config option.

To Reproduce

Open wezterm and type lsd in my home folder. lsd uses nerd font to show icons next to filenames.

Configuration

-- Pull in the wezterm API
local wezterm = require 'wezterm'

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
  config = wezterm.config_builder()
end

-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'OneDark (base16)'

config.font = wezterm.font_with_fallback({'Firacode Nerd Font Mono','Droid Sans Fallback'})
-- config.font = wezterm.font('Droid Sans Fallback')

config.font_size = 11

config.use_dead_keys = false
config.scrollback_lines = 10000
config.enable_tab_bar = true
config.window_background_opacity = 0.9
config.enable_wayland = false

-- Needed for RPi4 target
config.front_end = "WebGpu"

-- and finally, return the configuration to wezterm
return config

Expected Behavior

No font error pop ups

Logs

09:51:15.808  WARN   window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.portal.Error.NotFound: Requested setting not found
09:51:51.983  WARN   wezterm_font                > No fonts contain glyphs for these codepoints: \u{f6ef}.
Placeholder glyphs are being displayed instead.
You may wish to install additional fonts, or adjust your
configuration so that it can find them.
https://wezfurlong.org/wezterm/config/fonts.html has more information about configuring fonts.
Set warn_about_missing_glyphs=false to suppress this message.

Anything else?

image

wez commented 1 year ago

If I run: fc-list ':charset=6fef' I get:

/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf: Droid Sans Fallback:style=Regular

From the error message you shared, shouldn't that be: fc-list ':charset=f6ef?

I don't believe that that glyph is provided by Droid Sans; with the full set of droid fonts installed, none of them are reported by fc-list as containing that codepoint.

$  fc-list ':charset=f6ef'
/usr/share/fonts/jomolhari-fonts/Jomolhari-alpha3c-0605331.ttf: Jomolhari:style=Regular
RoninTech commented 1 year ago

Thanks Wes. Good catch. Defo time to get the glasses prescription updated.

I downloaded the Jomolhari font and now the errors are gone. 😊

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.