-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WezTerm doesn't use the Nerd Font Symbols fallback when using certain non-default fonts #5404
Comments
There's insufficient information to reproduce the issue in this report. |
Hello. My understanding of WezTerm's font handling is that it will use the -- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
config.font = wezterm.font('Fira Code')
config.default_prog = { 'C:\\Users\\Rowan\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe', }
-- and finally, return the configuration to wezterm
return config But this isn't happening. I am using Oh My Posh to customise the prompt string in my shell (PowerShell 7.4.2). Oh My Posh requires a font with nerd font symbols to display correctly. In WezTerm, if I set my font to If I run
If I instead specify -- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This will hold the configuration.
local config = wezterm.config_builder()
config.font = wezterm.font('JetBrains Mono')
config.default_prog = { 'C:\\Users\\Rowan\\AppData\\Local\\Microsoft\\WindowsApps\\Microsoft.PowerShell_8wekyb3d8bbwe\\pwsh.exe', }
-- and finally, return the configuration to wezterm
return config And here is the output of running
|
I'd recommend running |
I found the exact heart symbol used by my Oh My Posh prompt string on the Nerd Fonts site; it's {
"background": "p:teal_blue",
"foreground": "p:white",
"properties": {
"time_format": "15:04"
},
"style": "diamond",
"template": " \u2665 {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b0",
"type": "time"
} With WezTerm configured to use
This suggests, as you did in your comment, that the heart symbol is not present in the And if switch my WezTerm font back to
My speculation is WezTerm detects that |
Since your config says to use Fira Code as the primary font, and Fira Code includes that heart symbol, then no fallback is performed for that glyph, because it is immediately found in the primary font. This is working as intended; wezterm doesn't have a way to mix and match fonts based on arbitrary codepoints. This issue is open as a feature request for that functionality: |
I didn't occur to me to check the contents of I see that WezTerm is working as intended. Apologies for the inconvenience. Thank you for taking the time to answer my questions. |
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. |
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20240509-223025-91a16e52
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
If I change the default font used by WezTerm from JetBrains Mono to Fira Code, Consolas, or Cascadia Code (these are fonts I've tried; used the latest versions of all three), WezTerm no longer uses the Nerd Font Symbols fallback. However, I also tried Geist and Geist Mono, and with them WezTerm does appear to use the Nerd Font Symbols fallback. Based on the font fallback section of the docs, I would have expected the fallback to be used in all these cases. Tried using both the
font()
andfont_with_fallback()
functions; result is the same with both.To Reproduce
Edit .wezterm.lua and specify either Fira Code, Consolas, or Cascadia Code as the font and then save the file.
Configuration
Expected Behavior
The Nerd Font Symbols fallback is used with whatever font I specify.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: