Skip to content
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

Wrong font is used although ls-fonts reports the correct font #4552

Closed
DrTobe opened this issue Nov 9, 2023 · 2 comments
Closed

Wrong font is used although ls-fonts reports the correct font #4552

DrTobe opened this issue Nov 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@DrTobe
Copy link

DrTobe commented Nov 9, 2023

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

Linux X11, Linux Wayland

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

mutter (Gnome)

WezTerm version

20231107-082518-f0e3eecb

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

I have configured wezterm to use "Source Code Pro" which seems to be found and accepted but the glyphs are actually rendered using the built-in "JetBrains Mono" font.

To Reproduce

❯ wezterm ls-fonts
Primary font:
wezterm.font_with_fallback({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-Regular.otf, FontConfig
  -- Assumed to have Emoji Presentation
  "Source Code Pro",

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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=true:
wezterm.font_with_fallback({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-ExtraLightIt.otf, FontConfig
  -- Assumed to have Emoji Presentation
  -- AKA: "Source Code Pro ExtraLight"
  {family="Source Code Pro", weight="ExtraLight", style="Italic"},

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-ExtraLight.otf, FontConfig
  -- Assumed to have Emoji Presentation
  {family="Source Code Pro", weight="ExtraLight"},

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-Semibold.otf, FontConfig
  -- Assumed to have Emoji Presentation
  {family="Source Code Pro", weight="DemiBold"},

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-SemiboldIt.otf, FontConfig
  -- Assumed to have Emoji Presentation
  -- AKA: "Source Code Pro Semibold"
  {family="Source Code Pro", weight="DemiBold", style="Italic"},

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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({
  -- /home/tobbe/.local/share/fonts/Source Code Pro-It.otf, FontConfig
  -- Assumed to have Emoji Presentation
  {family="Source Code Pro", style="Italic"},

  -- <built-in>, BuiltIn
  "JetBrains Mono",

  -- /usr/share/fonts/truetype/noto/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({
  -- <built-in>, BuiltIn
  {family="Roboto", weight="Bold"},

  -- /home/tobbe/.local/share/fonts/Source Code Pro-Regular.otf, FontConfig
  -- Assumed to have Emoji Presentation
  "Source Code Pro",

  -- <built-in>, BuiltIn
  "JetBrains Mono",

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

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

})

❯ wezterm ls-fonts --text Q
LeftToRight
 0 Q    \u{51}       x_adv=11 cells=1  glyph=Q,124  wezterm.font("JetBrains Mono", {weight="Regular", stretch="Normal", style="Normal"})
                                      <built-in>, BuiltIn

Configuration

config.font = wezterm.font("Source Code Pro", { weight = "Regular", stretch = "Normal", style = "Normal" }) -- /home/tobbe/.local/share/fonts/Source Code Pro-Regular.otf, FontConfig

Expected Behavior

No response

Logs

wezterm version: 20231107-082518-f0e3eecb x86_64-unknown-linux-gnu
Window Environment: Wayland
WebGPU: name=Mesa Intel(R) Graphics (ADL GT2), device_type=IntegratedGpu, backend=Gl, vendor=32902, device=0

Anything else?

I have checked if for some reasons the font files are broken but as far as I can tell, they seem to be ok and to contain the glyphs which are not used.

@DrTobe DrTobe added the bug Something isn't working label Nov 9, 2023
@DrTobe
Copy link
Author

DrTobe commented Dec 1, 2023

I have switched to another font which does work as configured. So maybe this bug is not resolved, but I will not put any effort into resolving this anymore.

@DrTobe DrTobe closed this as completed Dec 1, 2023
Copy link
Contributor

github-actions bot commented Jan 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant