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

bold styles not rendered in 20210404-112810-b63a949d #648

Closed
dmfay opened this issue Apr 5, 2021 · 6 comments
Closed

bold styles not rendered in 20210404-112810-b63a949d #648

dmfay opened this issue Apr 5, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@dmfay
Copy link
Contributor

dmfay commented Apr 5, 2021

I just updated and text that should be bold is now normal weight. Here's a sample, with the font changed to DejaVu Sans Mono to make sure it isn't any of the funny business I have configured on my end:

test string showing bold and normal text looking identical

Session: 20210405144153.tar.gz

Environment (please complete the following information):

  • OS: Linux lamia 5.11.11-arch1-1 build issue with harfbuzz #1 SMP PREEMPT Tue, 30 Mar 2021 14:10:17 +0000 x86_64 GNU/Linux
  • Version: wezterm 20210404-112810-b63a949d
@dmfay dmfay added the bug Something isn't working label Apr 5, 2021
@wez
Copy link
Owner

wez commented Apr 5, 2021

Doh, sorry about that. I just pushed a fix for this!

wez added a commit that referenced this issue Apr 5, 2021
Ungh, shouldn't push before I'm awake :-/

refs: #648
wez added a commit that referenced this issue Apr 5, 2021
@gwww
Copy link
Contributor

gwww commented Apr 5, 2021

I just downloaded latest build wezterm 20210405-110924-a5bb5be8 and not seeing bold fonts either/yet.

I took your advice and not using font with Powerline, so font may be a problem, but bold is supported. Font from here: https://fonts.google.com/specimen/Inconsolata

WEZTERM_LOG=wezterm_font=trace ./wezterm
 2021-04-05T21:07:38.473Z TRACE wezterm_font::shaper::harfbuzz > compute metrics across these handles for size=16, dpi=72,
             theoretical pixel height 16: [OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }, Memory { name: "../../assets/fonts/JetBrainsMono-Regular.ttf", data_len: 171876, index: 0 }, Memory { name: "../../assets/fonts/NotoColorEmoji.ttf", data_len: 7253060, index: 0 }, Memory { name: "../../assets/fonts/LastResortHE-Regular.ttf", data_len: 502504, index: 0 }]
 2021-04-05T21:07:38.473Z TRACE wezterm_font::shaper::harfbuzz > shaper wants 0 OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }
 2021-04-05T21:07:38.473Z DEBUG wezterm_font::ftwrap           > set_char_size computing 16 dpi=72 (pixel height=16)
 2021-04-05T21:07:38.475Z TRACE wezterm_font::shaper::harfbuzz > idx 0 cell_height is 16.78403401374817, which is 0.784034013748169 away from theoretical
                     height (factor 0.04900212585926056). Seems good enough
 2021-04-05T21:07:38.475Z TRACE wezterm_font::shaper::harfbuzz > metrics_for_idx=0, size=16, dpi=72 -> FontMetrics { cell_width: 8.0, cell_height: 16.78403401374817, descender: -4.0, underline_thickness: 0.8000016212463379, underline_position: -3.6000072956085205 }
 2021-04-05T21:07:38.540Z TRACE wezterm_font::shaper::harfbuzz > compute metrics across these handles for size=16, dpi=144,
             theoretical pixel height 32: [OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }, Memory { name: "../../assets/fonts/JetBrainsMono-Regular.ttf", data_len: 171876, index: 0 }, Memory { name: "../../assets/fonts/NotoColorEmoji.ttf", data_len: 7253060, index: 0 }, Memory { name: "../../assets/fonts/LastResortHE-Regular.ttf", data_len: 502504, index: 0 }]
 2021-04-05T21:07:38.540Z TRACE wezterm_font::shaper::harfbuzz > shaper wants 0 OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }
 2021-04-05T21:07:38.540Z DEBUG wezterm_font::ftwrap           > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:07:38.541Z TRACE wezterm_font::shaper::harfbuzz > idx 0 cell_height is 33.56806802749634, which is 1.568068027496338 away from theoretical
                     height (factor 0.04900212585926056). Seems good enough
 2021-04-05T21:07:38.541Z TRACE wezterm_font::shaper::harfbuzz > metrics_for_idx=0, size=16, dpi=144 -> FontMetrics { cell_width: 16.0, cell_height: 33.56806802749634, descender:
-7.0, underline_thickness: 1.6000032424926758, underline_position: -7.200014591217041 }
 2021-04-05T21:07:38.548Z TRACE wezterm_font::rasterizer::freetype > Rasterizier wants OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }
 2021-04-05T21:07:38.549Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:07:38.731Z TRACE wezterm_font::shaper::harfbuzz     > shaper wants 1 Memory { name: "../../assets/fonts/JetBrainsMono-Regular.ttf", data_len: 171876, index: 0 }
 2021-04-05T21:07:38.731Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:07:38.734Z TRACE wezterm_font::rasterizer::freetype > Rasterizier wants Memory { name: "../../assets/fonts/JetBrainsMono-Regular.ttf", data_len: 171876, index: 0 }
 2021-04-05T21:07:38.734Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:07:38.737Z TRACE wezterm_font::shaper::harfbuzz     > metrics_for_idx=1, size=16, dpi=144 -> FontMetrics { cell_width: 19.0, cell_height: 42.24008560180664, descender: -10.0, underline_thickness: 1.6000032424926758, underline_position: -5.760011672973633 }
 2021-04-05T21:08:37.453Z TRACE wezterm_font::shaper::harfbuzz     > compute metrics across these handles for size=16, dpi=144,
             theoretical pixel height 32: [OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }, Memory { name: "../../assets/fonts/JetBrainsMono-Regular.ttf", data_len: 171876, index: 0 }, Memory { name: "../../assets/fonts/NotoColorEmoji.ttf", data_len: 7253060, index: 0 }, Memory { name: "../../assets/fonts/LastResortHE-Regular.ttf", data_len: 502504, index: 0 }]
 2021-04-05T21:08:37.453Z TRACE wezterm_font::shaper::harfbuzz     > shaper wants 0 OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }
 2021-04-05T21:08:37.454Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:08:37.457Z TRACE wezterm_font::shaper::harfbuzz     > idx 0 cell_height is 33.56806802749634, which is 1.568068027496338 away from theoretical
                     height (factor 0.04900212585926056). Seems good enough
 2021-04-05T21:08:37.457Z TRACE wezterm_font::shaper::harfbuzz     > metrics_for_idx=0, size=16, dpi=144 -> FontMetrics { cell_width: 16.0, cell_height: 33.56806802749634, descender: -7.0, underline_thickness: 1.6000032424926758, underline_position: -7.200014591217041 }
 2021-04-05T21:08:37.457Z TRACE wezterm_font::rasterizer::freetype > Rasterizier wants OnDisk { path: "/Users/glenn/Library/Fonts/Inconsolata-VariableFont_wdth,wght.ttf", index: 0 }
 2021-04-05T21:08:37.457Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:08:48.546Z TRACE wezterm_font::shaper::harfbuzz     > shaper wants 2 Memory { name: "../../assets/fonts/NotoColorEmoji.ttf", data_len: 7253060, index: 0 }
 2021-04-05T21:08:48.546Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:08:48.546Z DEBUG wezterm_font::ftwrap               > set_char_size: FT_Set_Char_Size

Caused by:
    FreeType error 23 0x17: invalid pixel size, will inspect strikes
 2021-04-05T21:08:48.546Z DEBUG wezterm_font::ftwrap               > idx=0 info=FT_Bitmap_Size_ { height: 128, width: 136, size: 6976, x_ppem: 6976, y_ppem: 6976 }
 2021-04-05T21:08:48.547Z TRACE wezterm_font::rasterizer::freetype > Rasterizier wants Memory { name: "../../assets/fonts/NotoColorEmoji.ttf", data_len: 7253060, index: 0 }
 2021-04-05T21:08:48.547Z DEBUG wezterm_font::ftwrap               > set_char_size computing 16 dpi=144 (pixel height=32)
 2021-04-05T21:08:48.547Z DEBUG wezterm_font::ftwrap               > set_char_size: FT_Set_Char_Size

Caused by:
    FreeType error 23 0x17: invalid pixel size, will inspect strikes
 2021-04-05T21:08:48.547Z DEBUG wezterm_font::ftwrap               > idx=0 info=FT_Bitmap_Size_ { height: 128, width: 136, size: 6976, x_ppem: 6976, y_ppem: 6976 }
 2021-04-05T21:08:48.548Z TRACE wezterm_font::shaper::harfbuzz     > metrics_for_idx=2, size=16, dpi=144 -> FontMetrics { cell_width: 136.0, cell_height: 128.0, descender: -27.0,
underline_thickness: 0.0, underline_position: 0.0 }

Screen Shot 2021-04-05 at 17 13 22

@dmfay
Copy link
Contributor Author

dmfay commented Apr 6, 2021

20210405-110924-a5bb5be8 looks right for me, at least:

1617715637

@gwww since my config is also inconsolata-based, you might give it a shot:

  font = wezterm.font_with_fallback({
    "Inconsolata LGC",    -- Latin/Greek/Cyrillic with bold+italic variants
    "Noto Sans Symbols2", -- prefer flat symbol glyphs to JoyPixels
    "DejaVu Sans Mono",   -- ditto
    "FontAwesome 5 Free", -- ditto
    "JoyPixels"           -- emoji
  }),
  font_size = 11.0,
  line_height = 0.8,

  font_hinting = "Full",
  font_antialias = "Greyscale",
  freetype_interpreter_version = 40,
  dpi = 96.0,

@gwww
Copy link
Contributor

gwww commented Apr 6, 2021

Still no luck for me. I just seconds ago downloaded the latest nightly (to be sure I had the latest). I tried two different fonts, the other one being Cascadia Mono PL. I tried under bash and zsh. I'll install the font you have and see what happens.

@gwww
Copy link
Contributor

gwww commented Apr 6, 2021

I got it to work. The Inconsolata on https://fonts.google.com/specimen/Inconsolata has two ways of installing. "Static" - which means installing regular and bold as two separate files. Or, "Variable" which installs one file which includes multiple widths and multiple "boldness" (not sure the right word for regular, bold, semi-bold, etc.).

Static versions of a font works. Variable font does not work. I will create a bug for the variable font.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

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 Feb 4, 2023
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

3 participants