wez / wezterm

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

OTF Font is never rendered Bold #5064

Closed raimundomartins closed 3 months ago

raimundomartins commented 4 months ago

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

local wezterm = require 'wezterm'

local config = {}

if wezterm.config_builder then
  config = wezterm.config_builder()
end

config.bold_brightens_ansi_colors = "No"

return config

Expected Behavior

Font should be rendered bold

Logs

Debug Overlay
wezterm version: 20240203-110809-5046fc22 x86_64-unknown-linux-gnu
Window Environment: X11 dwm
Lua Version: Lua 5.4
OpenGL: AMD Radeon RX 6500 XT (radeonsi, navi24, LLVM 17.0.6, DRM 3.54, 6.6.17_1) 4.6 (Compatibility Profile) Mesa 23.3.5
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
10:29:06.799 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: I/O error: No such file or directory (os error 2): No such file or directory (os error 2)

Anything else?

unbold

raimundomartins commented 4 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: bold

wez commented 4 months ago

Please run wezterm ls-fonts and share the output here. (see also: https://wezfurlong.org/wezterm/troubleshooting.html#debugging-font-display)

raimundomartins commented 3 months ago

Sorry for the late response. Here's what you asked for

wezterm ls-fonts ``` $ wezterm ls-fonts Primary font: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Half Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") -- Will synthesize italics -- Will synthesize dim {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Half Italic=false: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") -- Will synthesize dim {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Bold Italic=false: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Bold Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") -- Will synthesize italics {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Normal Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") -- Will synthesize italics {family="Inconsolata", weight="Medium"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) Title font: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/Roboto-Bold.ttf, FontConfig {family="Roboto", weight="Bold"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) ```

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:

inconsolata.otf (the bad one) ``` $ wezterm ls-fonts --text '\033[0;31mHello\033[1;31mHello\033[0m' LeftToRight 0 \ \u{5c} x_adv=8 cells=1 glyph=backslash,92 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 1 0 \u{30} x_adv=8 cells=1 glyph=zero,48 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 2 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 3 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 4 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,91 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 5 0 \u{30} x_adv=8 cells=1 glyph=zero,48 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 6 ; \u{3b} x_adv=8 cells=1 glyph=semicolon,59 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 7 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 8 1 \u{31} x_adv=8 cells=1 glyph=one,49 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 9 m \u{6d} x_adv=8 cells=1 glyph=m,109 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 10 H \u{48} x_adv=8 cells=1 glyph=H,72 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 11 e \u{65} x_adv=8 cells=1 glyph=e,101 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 12 l \u{6c} x_adv=8 cells=1 glyph=l,108 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 13 l \u{6c} x_adv=8 cells=1 glyph=l,108 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 14 o \u{6f} x_adv=8 cells=1 glyph=o,111 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 15 \ \u{5c} x_adv=8 cells=1 glyph=backslash,92 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 16 0 \u{30} x_adv=8 cells=1 glyph=zero,48 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 17 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 18 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 19 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,91 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 20 1 \u{31} x_adv=8 cells=1 glyph=one,49 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 21 ; \u{3b} x_adv=8 cells=1 glyph=semicolon,59 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 22 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 23 1 \u{31} x_adv=8 cells=1 glyph=one,49 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 24 m \u{6d} x_adv=8 cells=1 glyph=m,109 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 25 H \u{48} x_adv=8 cells=1 glyph=H,72 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 26 e \u{65} x_adv=8 cells=1 glyph=e,101 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 27 l \u{6c} x_adv=8 cells=1 glyph=l,108 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 28 l \u{6c} x_adv=8 cells=1 glyph=l,108 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 29 o \u{6f} x_adv=8 cells=1 glyph=o,111 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 30 \ \u{5c} x_adv=8 cells=1 glyph=backslash,92 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 31 0 \u{30} x_adv=8 cells=1 glyph=zero,48 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 32 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 33 3 \u{33} x_adv=8 cells=1 glyph=three,51 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 34 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,91 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 35 0 \u{30} x_adv=8 cells=1 glyph=zero,48 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") 36 m \u{6d} x_adv=8 cells=1 glyph=m,109 wezterm.font("Inconsolata", {weight="Medium", stretch="Normal", style="Normal"}) /usr/share/fonts/OTF/Inconsolata.otf, FontConfigMatch("monospace") ```
inconsolata go nerd font.ttf (the good one) ``` $ wezterm ls-fonts --text '\033[0;31mHello\033[1;31mHello\033[0m' LeftToRight 0 \ \u{5c} x_adv=8 cells=1 glyph=backslash,63 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 1 0 \u{30} x_adv=8 cells=1 glyph=zero,19 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 2 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 3 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 4 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,62 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 5 0 \u{30} x_adv=8 cells=1 glyph=zero,19 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 6 ; \u{3b} x_adv=8 cells=1 glyph=semicolon,30 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 7 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 8 1 \u{31} x_adv=8 cells=1 glyph=one,20 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 9 m \u{6d} x_adv=8 cells=1 glyph=m,80 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 10 H \u{48} x_adv=8 cells=1 glyph=H,43 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 11 e \u{65} x_adv=8 cells=1 glyph=e,72 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 12 l \u{6c} x_adv=8 cells=1 glyph=l,79 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 13 l \u{6c} x_adv=8 cells=1 glyph=l,79 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 14 o \u{6f} x_adv=8 cells=1 glyph=o,82 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 15 \ \u{5c} x_adv=8 cells=1 glyph=backslash,63 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 16 0 \u{30} x_adv=8 cells=1 glyph=zero,19 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 17 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 18 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 19 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,62 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 20 1 \u{31} x_adv=8 cells=1 glyph=one,20 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 21 ; \u{3b} x_adv=8 cells=1 glyph=semicolon,30 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 22 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 23 1 \u{31} x_adv=8 cells=1 glyph=one,20 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 24 m \u{6d} x_adv=8 cells=1 glyph=m,80 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 25 H \u{48} x_adv=8 cells=1 glyph=H,43 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 26 e \u{65} x_adv=8 cells=1 glyph=e,72 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 27 l \u{6c} x_adv=8 cells=1 glyph=l,79 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 28 l \u{6c} x_adv=8 cells=1 glyph=l,79 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 29 o \u{6f} x_adv=8 cells=1 glyph=o,82 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 30 \ \u{5c} x_adv=8 cells=1 glyph=backslash,63 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 31 0 \u{30} x_adv=8 cells=1 glyph=zero,19 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 32 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 33 3 \u{33} x_adv=8 cells=1 glyph=three,22 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 34 [ \u{5b} x_adv=8 cells=1 glyph=bracketleft,62 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 35 0 \u{30} x_adv=8 cells=1 glyph=zero,19 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") 36 m \u{6d} x_adv=8 cells=1 glyph=m,80 wezterm.font("InconsolataGo Nerd Font", {weight="Regular", stretch="Normal", style="Normal"}) /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") ```

For completion, here's wezterm ls-fonts for the case of the TTF font:

TTF wezterm ls-fonts ``` $ wezterm ls-fonts Primary font: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") "InconsolataGo Nerd Font", -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Half Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") -- Will synthesize italics -- Will synthesize dim "InconsolataGo Nerd Font", -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Half Italic=false: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") -- Will synthesize dim "InconsolataGo Nerd Font", -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Bold Italic=false: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Bold.ttf, FontConfigMatch("monospace") {family="InconsolataGo Nerd Font", weight="Bold"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Bold Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Bold.ttf, FontConfigMatch("monospace") -- Will synthesize italics {family="InconsolataGo Nerd Font", weight="Bold"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) When Intensity=Normal Italic=true: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/InconsolataGoNerdFont-Regular.ttf, FontConfigMatch("monospace") -- Will synthesize italics "InconsolataGo Nerd Font", -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) Title font: wezterm.font_with_fallback({ -- /usr/share/fonts/TTF/Roboto-Bold.ttf, FontConfig {family="Roboto", weight="Bold"}, -- /usr/share/fonts/noto-emoji/NotoColorEmoji-noflags.ttf, FontConfig -- Assumed to have Emoji Presentation -- Pixel sizes: [128] "Noto Color Emoji", }) ```

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...)

wez commented 3 months ago

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.

raimundomartins commented 3 months ago

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.

wez commented 3 months ago

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

github-actions[bot] commented 3 months ago

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.

oOosys commented 3 months ago

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: _o--wezterm--_oo--ISSUE--_O--Terminal-defaultFont-failsToRenderBold-1of2-defaultFont--_oo0

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: _o--wezterm--_oo--ISSUE--_O--Terminal-defaultFont-failsToRenderBold-2of2-B612_Mono--_oo0

github-actions[bot] commented 2 months 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.