Closed raimundomartins closed 3 months ago
I just realized that wezterm can render bold fonts using the default fonts, but it was using the settings in fontconfig so it picked (correctly) this one inconsolata.otf.tar.gz. I don't know why bold doesn't work with it, but here's a picture of the same font being rendered correctly in alacritty:
Please run wezterm ls-fonts
and share the output here. (see also: https://wezfurlong.org/wezterm/troubleshooting.html#debugging-font-display)
Sorry for the late response. Here's what you asked for
Also, I took the liberty to try
wezterm ls-fonts --text '\033[0;31mHello\033[1;31mHello\033[0m'
with this font as well as a working font:
For completion, here's wezterm ls-fonts
for the case of the TTF font:
To clarify, the TTF font works (almost) fine for me. It renders the same as other terminals if I use the size 12.009 instead of just size 12. But that is another issue that I won't go into unless you'd like to, since I have an easy workaround (just use the different size...)
Where does the choice of monospace
font come from? Is that something that voidlinux is imposing on the config?
The config you shared has no font specified; the default in "official" wezterm should be JetBrains Mono
.
I do not recommend using monospace
or other similar fontconfig aliases, as it removes control of this sort of font styling from wezterm.
It probably comes from my .config/fontconfig/fonts.conf
:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>InconsolataGo Nerd Font</family>
<family>Inconsolata</family>
<family>Liberation Mono</family>
</prefer>
</alias>
</fontconfig>
I thought this meant that when an app asks for monospace it gets those fonts in that order (an impression I got from archlinux wiki). What I do to switch between the OTF and TTF is obviously swap their respective lines here.
I'd recommend that you use https://wezfurlong.org/wezterm/config/lua/wezterm/font_with_fallback.html to explicitly configure the fonts used by wezterm
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
raimundomartins : PLEASE NOTICE that the image you have provided as a proof of not proper rendering the bold font shows that the bold version of text DIFFERS from the non-bold regular one ... The difference is hard to be visually detected, but it is there if you check the colors of the pixels in both of the versions. In other words, you haven't inspected the displayed outcome detailed enough to see that the bold was actually rendered bold ...
It seems that the default font (both: if not specified or if specified as 'JetBrains Mono' in the configuration) bold glyphs are only slightly different from the normal ones which may cause the impression that bold is not rendered properly, where it actually is:
SCREENSHOT with default font specified (or without specification) with only a slight difference between the regular and bold glyph versions which at first glance may cause the impression that there is no difference:
SCREENSHOT with "B612 Mono" as font where the difference between the regular and bold versions is huge enough to clearly visually distinguish the versions at first glance:
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?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
dwm
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?
No, and I'll explain why below
Describe the bug
On not trying Nightly: I use voidlinux and no flatpak. It's not clear what branch is nightly so I can build from source.
Fonts are never rendered in bold. Changing
bold_brightens_ansi_colors
to any other setting has no effect.To Reproduce
Open wezterm and run
echo -e '\033[0;31mHello\033[1;31mHello\033[0m'
Configuration
Expected Behavior
Font should be rendered bold
Logs
Anything else?