Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cell size calculation not settled on startup #563

Closed
hzeller opened this issue Mar 20, 2021 · 4 comments
Closed

Cell size calculation not settled on startup #563

hzeller opened this issue Mar 20, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@hzeller
Copy link

hzeller commented Mar 20, 2021

Describe the bug

When first starting the terminal, the cells occcupy a particular size, as calculated from the number of columns and rows and pixel width/height from the screen ( TIOCGWINSZ). That size seems to be wrong/not settled yet. After a resize or reloading of the wezterm.lua, the correct font size is calculated.

This is maybe related to #535 ?

Environment (please complete the following information):

  • OS: Linux X11
  • Version: 20210314-114017-04b7cedd-16-ge5ae1d47

To Reproduce

With font config below, start terminal and query size.

Current timg has a new --verbose that can be helpful.

Right after start-up, run a timg:

timg --verbose someimage.png
... (image, somewhat distorted as the scale factor is calculated by timg)
Terminal cells: 80x24  cell-pixels: 8x16

Now, force recalculation, either by resizing terminal or touching the configuration file

timg --verbose someimage.png
... (image, this time properly scaled)
Terminal cells: 80x24  cell-pixels: 10x22

Configuration

Relevant font configuration

   font_rules = {
      {
	 intensity = "Bold",
	 font = wezterm.font("Terminus (TTF)"),
      },
      {
 	 font = wezterm.font("Terminus (TTF)"),
      }
   },

Expected behavior

Font size is correct on start-up (in this case: 10x22).

@hzeller hzeller added the bug Something isn't working label Mar 20, 2021
@hzeller
Copy link
Author

hzeller commented Mar 20, 2021

The font matched here is
TerminusTTF-4.46.0.ttf.gz

@wez
Copy link
Member

wez commented Mar 20, 2021

Another good catch! Yes, very similar to that other issue. Should be fixed now in main!

@hzeller
Copy link
Author

hzeller commented Mar 20, 2021

Confirmed fixed!
Thanks!

@hzeller hzeller closed this as completed Mar 20, 2021
@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
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants