Open FabianRig opened 8 months ago
Perhaps this helps?
I'd suggest making a recording of what exactly is starship sending to the terminal using wezterm record
and share that recording here 🙏
One guess: the starship line is bold red and the prompt is normal, so I would guess that's a difference which might explain the different rendering. What does wezterm ls-fonts
itself say, e.g. is there a difference between the normal version and the other ones?
(is there a way to make wezterm ls-fonts --text
use bold?)
I've attached the recording (that's awesome, btw!) as well as the ls-fonts output. Perhaps you can spot something in there?!
ls-fonts.txt wezterm-recording-7vPTNM.cast.txt
Unicode 21e3 (that kind of arrow) doesn't seem to work. As a workaround I can use other arrows which are part of the nerd font. However, it would still be nice to find out what the problem is...
I'm experiencing a similar issue as well on NixOS unstable, narrowing it down to the difference between the character being emitted by the prompt/shell vs stdout from other programs.
For a minimum reproducible example, add ⇣⇡
somewhere in the shell prompt. Open a new window and find that those characters do not display correctly. Then save those two characters in a text file. Open another window, cat
the file you have just saved. If you watch carefully, those characters will display as boxes at first, before rendering correctly after a split second. Now even the arrows in the prompt will be rendered correctly.
Neither the Fixed
font nor FiraCode Nerd Font Mono
is part of the default wezterm config, but in the OP you claim that you have no config, so something about this report doesn't add up.
If you truly have no wezterm config, how did you install wezterm?
Is the nix flavor of wezterm not including the normal wezterm default font configuration?
Do you have an unusual fontconfig setup?
Hi, thanks for your answer!
Sorry for being imprecise! I do have a config and the ls-fonts is with the config. However, the same problem happens if I start wezterm using "wezterm -n" -- which from my understanding is without a config?
I don't have access to the machine atm, so I can't provide my current config nor the ls-fonts from wezterm -n.
Is the nix flavor of wezterm not including the normal wezterm default font configuration?
I can confirm that the nix packaged version of wezterm includes the default font configuration, both by observing the fallback fonts running without a config as well as looking at the nix derivation.
FWIW I ran a bisect against nixpkgs, nixos/nixpkgs@700cec9bceb81db78b085be65a6394a5004b4ccd is where the behaviour changed. The referenced commit updated from 20230712-072601-f4abf8fd
to the 20240127-113634-bbcac864
release. During the process, both the nixos system configuration and wezterm configuration remained the same, ls-fonts resolves to the same font path in the nix store each time. Is this sufficient to rule out the issue with fontconfig?
Just FYI: I have a similar observation on mac: I do not configure any fonts and wezterm ls-fonts
only shows the built-in ones, but running wezterm ls-fonts --text ⇕
tells me it uses Menlo for displaying that symbol:
λ wezterm ls-fonts --text ⇕
LeftToRight
0 ⇕ \u{21d5} x_adv=8 cells=1 glyph=uni21D5,1924 wezterm.font("Menlo", {weight="Regular", stretch="Normal", style="Normal"})
/System/Library/Fonts/Menlo.ttc, CoreText
First, it's worth noting that most fonts do not contain every possible glyph.
On all operating systems, if wezterm cannot find a glyph in the list of configured fonts, it will attempt to ask the system which font has it, using an OS-specific fallback. As a result it is expected to sometimes see fonts show up in wezterm ls-fonts --text
output which are not explicitly listed in the wezterm config.
What I'd like to nail down here is:
wezterm -n
to run the terminal but wezterm ls-fonts
(without the -n
) then you are comparing two different things.fc-list ':charset=21e3'
-v
to the fc-list
invocation to return more information about the matches.Hi wez!
Attached you find files for the following:
Perhaps I wasn't precise: The missing glyph problem in the starship line is both present in a terminal with my config as well as in a terminal which I start with wezterm -n (without a config).
Best regards and thank you for trying to solve this!
fonts-with-21e3.txt fonts-with-21e3-v.txt ls-fonts.txt ls-fonts-n.txt wezterm.lua.txt
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Gnome
WezTerm version
20240203-110809-546fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
Running on NixOS unstable.
Starship shows the git repo status in its prompt.
When the local repo is behind or ahead, an arrow is shown inside squared brackets. This arrow doesn't render correctly. However, if you copy/paste the missing symbol from the starship line to the prompt, it renders correctly.
(The arrow also renders correctly in both "Console" and "Kitty".
To Reproduce
The same happens without a config, e.g. "wezterm -n". Console and Kitty work fine.
Configuration
no config
Expected Behavior
Render up and down arrows correctly inside the squared brackets of starship.
Logs
No response
Anything else?
No response