wez / wezterm

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

"Lock" symbol in password request showing as a different glyph #5507

Open beckkake opened 4 weeks ago

beckkake commented 4 weeks ago

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

Linux X11

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

I am using awesome-git (AwesomeWM).

WezTerm version

20240203-110809-5046fc22

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

Typically, when running commands with sudo, WezTerm prompts for your password with a message that says "[sudo] password for user: (lock symbol here)". This worked fine for a while, but I was experimenting with some fonts once and it has now completely changed to a very random symbol.

I currently only have one font defined, and the font shouldn't even include this glyph - I actually don't know where it's from. I have reverted my configuration to how it was before the glitch happened, tested without any configuration set at all (completely deleted it), and it still happens.

To Reproduce

It may not be guaranteed to reproduce the issue, but switching between multiple different fonts in my configuration and then reverting to my initially set font has caused the issue.

Configuration

local wezterm = require 'wezterm'

local config = wezterm.config_builder()

config.default_prog = {'bash'}
config.enable_tab_bar = false

config.window_padding = {left = 24, right = 24, top = 8, bottom = 8}

config.font = wezterm.font 'CozetteHiDpi'
config.font_size = 20.0

config.colors = {
    foreground = '#EEEEEE',
    background = '#282828',
    cursor_bg = '#EEEEEE',
    cursor_fg = '#282828',
    cursor_border = '#EEEEEE',
    selection_fg = '#444444',
    selection_bg = '#A3A3A3',
    scrollbar_thumb = '#EEEEEE',
    split = '#1E1E1E',

    ansi = {
        '#1E1E1E', '#ED333B', '#57E389', '#FFA348', '#62A0EA', '#E05C91',
        '#5BC8AF', '#EEEEEE'
    },
    brights = {
        '#000000', '#B8272D', '#39995B', '#E66100', '#1C71D8', '#9E3f65', '#3C8574', '#FFFFFF'

    }
}

return config

Expected Behavior

I expected the normal lock symbol to show like it used to do. I also expected it to not show a glyph that isn't even in the font (Cozette). I'm pretty sure this font does not have Japanese characters.

Logs

No response

Anything else?

Here is the bug with my configuration enabled.

image

Here is the bug with no configuration at all.

image

bew commented 3 weeks ago

How did you install wezterm? These symbols should usually be from nerd font symbols that are supposed to be installed with wezterm

beckkake commented 3 weeks ago

How did you install wezterm? These symbols should usually be from nerd font symbols that are supposed to be installed with wezterm

I am using EndeavourOS, and installed wezterm via pacman.

bew commented 3 weeks ago

Looking at https://archlinux.org/packages/extra/x86_64/wezterm/ I think you also need to install noto-fonts-emoji & ttf-nerd-fonts-symbols-mono to also have the default emojis & symbols (the maintainer for the Arch package decided the default symbols shouldn't be installed by default iirc)

beckkake commented 3 weeks ago

Looking at https://archlinux.org/packages/extra/x86_64/wezterm/ I think you also need to install noto-fonts-emoji & ttf-nerd-fonts-symbols-mono to also have the default emojis & symbols (the maintainer for the Arch package decided the default symbols shouldn't be installed by default iirc)

Hey, thanks! The first package was installed but the second was not. However, before I changed the fonts, the lock symbol showed up just fine - I actually think it was even a symbol that is already defined in the font I'm using. I preferred that symbol because I am using a bitmap font, and the symbol was also pixelated. With the ttf-nerd-fonts-symbols-mono package, the symbol has been fixed but is obviously just a material design lock symbol. Is this able to be customized?

bew commented 3 weeks ago

It looks like there was some changes to the Arch package recently, maybe try to raise the issue with them 🤔 https://gitlab.archlinux.org/archlinux/packaging/packages/wezterm/-/commits/main

Unless you find where the original lock icon you had before came from and move that up in the font selection I'm afraid not (or I don't see how)

beckkake commented 3 weeks ago

It looks like there was some changes to the Arch package recently, maybe try to raise the issue with them 🤔 https://gitlab.archlinux.org/archlinux/packaging/packages/wezterm/-/commits/main

Unless you find where the original lock icon you had before came from and move that up in the font selection I'm afraid not (or I don't see how)

I decided to just customize the sudo prompt with the lock icon it used to be with sudo -p "prompt" and disable detect_password_input for now.

image

An image of the glyph from my font that it used to be. My pet peeve with this is that a box is shown where the user is meant to type when you simply customize the sudo prompt. With whatever WezTerm does to simply add a lock at the end of the message, it removes that visual depiction.

2024-06-04-155108

An image of the glyph it shows with the recommended package. See, no box.

2024-06-04-155156

And here's them side by side, lol. No box again.

This is an okay fix, but I wish I could just customize that glyph specifically through a configuration option. I am not sure if WezTerm just targets a specific unicode character and uses that, meaning I could edit that in my current font and have it match?

Regardless, thanks for your help!