wez / wezterm

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

Wezterm fonts are bold (since recent updates) even when set to Regular, compared to other terminals #3946

Closed sandikata closed 1 year ago

sandikata commented 1 year ago

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

Linux X11

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

Mutter/Gnome Shell

WezTerm version

wezterm 20230408-112425-69ae8472-gentoo

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

Fonts in wezterm are bold (even if weight set to Regular)

To Reproduce

Up to date OS

Open Wezterm

Configuration

local wezterm = require 'wezterm'
local act = wezterm.action

wezterm.on('update-right-status', function(window, pane)
  window:set_right_status(window:active_workspace())
end)

return {
  font = wezterm.font_with_fallback {
    { family = 'JetBrainsMono Nerd Font', weight = 'Regular', style = 'Normal', scale = 1.1, harfbuzz_features = { 'calt=0', 'clig=0', 'liga=0' }, },
--    { family = 'Noto Mono Nerd Font', weight = 'Regular',scale = 1.1, },
--    { family = 'FiraCode', weight = 'Regular', scale = 1.1 },
--    { family = 'Iosevka Term', weight = 'Regular', scale = 1.1, stretch = 'Expanded', },
--    { family = 'CaskaydiaCove Nerd Font', weight = 'Regular', scale = 1.2, stretch = 'Expanded', },
    { family = 'agave Nerd Font Mono', weight = 'Regular', scale = 1.3, stretch = 'Expanded', },
    { family = 'Terminus', weight = 'Bold' },
    'Noto Color Emoji',
  },

  font_size = 12.0,
  line_height = 1.1,
--  cell_width = 1.0,
  freetype_load_target = "HorizontalLcd",
  font_rasterizer = 'FreeType',
  freetype_load_flags = "FORCE_AUTOHINT",
  freetype_render_target = 'HorizontalLcd',

  bold_brightens_ansi_colors = true,
  color_scheme_dirs = { os.getenv("HOME") .. "/.config/wezterm/colors/" },
  color_scheme = "Relaxed",

  -- term = "wezterm",

  front_end = "WebGpu",

--  max_fps = 165,

  enable_wayland = false,

  window_background_opacity = 0.98,

  -- initial_cols = 255,
  -- initial_rows = 50,

  scrollback_lines = 100000,

  enable_scroll_bar = true,

  use_fancy_tab_bar = true,

  tab_bar_at_bottom = true,

  window_frame = {
    -- The font used in the tab bar.
    -- Roboto Bold is the default; this font is bundled
    -- with wezterm.
    -- Whatever font is selected here, it will have the
    -- main font setting appended to it to pick up any
    -- fallback fonts you may have used there.
    font = wezterm.font { family = 'Roboto', weight = 'Bold' },

    -- The size of the font in the tab bar.
    -- Default to 10. on Windows but 12.0 on other systems
    font_size = 12.0,

    -- The overall background color of the tab bar when
    -- the window is focused
    active_titlebar_bg = '#333333',

    -- The overall background color of the tab bar when
    -- the window is not focused
    inactive_titlebar_bg = '#333333',
  },

  colors = {
    tab_bar = {
      -- The color of the inactive tab bar edge/divider
      inactive_tab_edge = '#575757',
    },
  },

  inactive_pane_hsb = {
    saturation = 0.9,
    brightness = 0.8,
  },

  -- Split vertical current pane
  keys = {
    -- This will create a new split and run your default program inside it
    {
      key = '"',
      mods = 'CTRL|SHIFT|ALT',
      action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
    },
  },

  -- Split horizontal current pane
  keys = {
    -- This will create a new split and run your default program inside it
    {
      key = '%',
      mods = 'CTRL|SHIFT|ALT',
      action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
    },
  },

  -- Zoom pane
  keys = {
    {
      key = 'Z',
      mods = 'CTRL|SHIFT',
      action = wezterm.action.TogglePaneZoomState,
    },
  },

  -- Mouse cursor
  default_cursor_style = 'BlinkingBar',
  animation_fps = 10,
  cursor_blink_rate = 1000,
  cursor_blink_ease_in = 'Linear',
  cursor_blink_ease_out = 'Linear',
  -- cursor_bg = '#52ad70',
  -- cursor_fg = 'black',
  -- cursor_border = '#52ad70',

  -- Visual Bell Screen Blink
  visual_bell = {
    fade_in_function = 'EaseIn',
    fade_in_duration_ms = 150,
    fade_out_function = 'EaseOut',
    fade_out_duration_ms = 150,
  },
  colors = {
    visual_bell = '#202020',
  },

  -- Visual Bell Mouse Flare
  --   visual_bell = {
  --    fade_in_duration_ms = 75,
  --    fade_out_duration_ms = 75,
  --    target = 'CursorColor',
  --  },
  hide_mouse_cursor_when_typing = false,

  keys = {
    {
      key = '0',
      mods = 'CTRL',
      action = wezterm.action.ResetFontAndWindowSize,
    },
  },

}

Expected Behavior

To display fonts as they are actually

Logs

No response

Anything else?

Let me know if you need extra information

bew commented 1 year ago

Looks like a duplicate of #3032 ?

sandikata commented 1 year ago

I cannot be sure, as it is reported on Windows.

Windows and Linux are so different.

wez commented 1 year ago

Please provide screenshots to compare and the output from wezterm ls-fonts

sandikata commented 1 year ago
> $ wezterm ls-fonts
Primary font:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=58 variation=0, FontConfig
  {family="Iosevka Term", stretch="Expanded", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete Regular.otf, FontConfig
  {family="CaskaydiaCove Nerd Font", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16b.otb, FontConfig
  -- Pixel sizes: [16]
  {family="Terminus", weight="Bold", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

When Intensity=Half Italic=true:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=33 variation=0, FontConfig
  -- AKA: "Iosevka Term XLt Ex"
  {family="Iosevka Term", weight="ExtraLight", stretch="Expanded", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete ExtraLight Italic.otf, FontConfig
  -- AKA: "CaskaydiaCove Nerd Font ExtraLight"
  {family="CaskaydiaCove Nerd Font", weight="ExtraLight", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  -- Will synthesize italics
  -- Will synthesize dim
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16n.otb, FontConfig
  -- Will synthesize italics
  -- Pixel sizes: [16]
  {family="Terminus", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Will synthesize italics
  -- Will synthesize dim
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

When Intensity=Half Italic=false:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=22 variation=0, FontConfig
  -- AKA: "Iosevka Term XLt Ex"
  {family="Iosevka Term", weight="ExtraLight", stretch="Expanded", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete ExtraLight.otf, FontConfig
  {family="CaskaydiaCove Nerd Font", weight="ExtraLight", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  -- Will synthesize dim
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16n.otb, FontConfig
  -- Pixel sizes: [16]
  {family="Terminus", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Will synthesize dim
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

When Intensity=Bold Italic=false:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=94 variation=0, FontConfig
  {family="Iosevka Term", weight="DemiBold", stretch="Expanded", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete SemiBold.otf, FontConfig
  {family="CaskaydiaCove Nerd Font", weight="DemiBold", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  -- Will synthesize bold
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16b.otb, FontConfig
  -- Pixel sizes: [16]
  {family="Terminus", weight="Bold", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Will synthesize bold
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

When Intensity=Bold Italic=true:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=105 variation=0, FontConfig
  -- AKA: "Iosevka Term Semibold Extended"
  {family="Iosevka Term", weight="DemiBold", stretch="Expanded", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete SemiBold Italic.otf, FontConfig
  -- AKA: "CaskaydiaCove Nerd Font SemiBold"
  {family="CaskaydiaCove Nerd Font", weight="DemiBold", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  -- Will synthesize italics
  -- Will synthesize bold
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16b.otb, FontConfig
  -- Will synthesize italics
  -- Pixel sizes: [16]
  {family="Terminus", weight="Bold", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Will synthesize italics
  -- Will synthesize bold
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

When Intensity=Normal Italic=true:
wezterm.font_with_fallback({
  -- /usr/share/fonts/iosevka/iosevka.ttc index=69 variation=0, FontConfig
  -- AKA: "Iosevka Term Extended"
  {family="Iosevka Term", stretch="Expanded", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/Caskaydia Cove Nerd Font Complete Italic.otf, FontConfig
  {family="CaskaydiaCove Nerd Font", style="Italic", scale=1.2},

  -- /usr/share/fonts/nerd-fonts/agave regular Nerd Font Complete Mono.ttf, FontConfig
  -- Will synthesize italics
  {family="agave Nerd Font Mono", scale=1.3},

  -- /usr/share/fonts/terminus/ter-u16b.otb, FontConfig
  -- Will synthesize italics
  -- Pixel sizes: [16]
  {family="Terminus", weight="Bold", scale=1.3},

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Will synthesize italics
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

Title font:
wezterm.font_with_fallback({
  -- /usr/share/fonts/roboto/Roboto-Bold.ttf, FontConfig
  {family="Roboto", weight="Bold"},

  -- /usr/share/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf, FontConfig
  "JetBrains Mono",

  -- /usr/share/fonts/noto-emoji/NotoColorEmoji.ttf, FontConfig
  -- Assumed to have Emoji Presentation
  -- Pixel sizes: [128]
  "Noto Color Emoji",

  -- <built-in>, BuiltIn
  "Symbols Nerd Font Mono",

})

rosen@aleksandrov ~                                                                                                                                                                                                         [8:34:54]
> $

WebGpu изображение

OpenGL изображение

wez commented 1 year ago

Thanks; Closing as a duplicate of https://github.com/wez/wezterm/issues/3032

github-actions[bot] commented 1 year 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.