Closed erf closed 3 years ago
Reading around a bit (https://wiki.lazarus.freepascal.org/Cocoa_DPI), it appears that 72.0 is the base value used by Cocoa; that number is significant because it is a constant factor in the points->pixels conversion function (pixels = point_size * dpi / 72
), so having dpi==72
means that points==pixels
.
I've pushed a commit that makes the default dpi==72 on macOS; with that set, a 10 point font in Terminal.app and WezTerm.app appear about the same size to me on a Retina macbook.
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.
Describe the bug
In the
.wezterm.lua
config file, i setfont_size = 13.0
, but compared to other terminals likeiTerm2
or theTerminal
app, the font is larger, similar to if it was set to 15-16 on the other Terminals.According to my screen on a Macbook Pro 13" 2017 with resolution of 2560x1600,
dpi
should be226.0
, but if i change it to that, the font is VERY large. However if i change it to about74
it looks about right compared to the other terminals.I saw in the docs you state that "DPI is not automatically probed", so is this the expected behaviour?
I'm i using the wrong
dpi
value?Maybe because of the retina screen the dpi should be set to
226/3=75.33
which is close to the number i 74 i tried? Not sure how these retina screens work. Will look into it.Maybe the
dpi
should be set to thePPD
on macs see this?Environment (please complete the following information):
To Reproduce
Set a
font_size = 13
in.wezterm.lua
, then open another Terminal likeiTerm2
with the same font size and observe that the font size is larger on Wezterm.Configuration
Expected behavior
Optimally the font size would be the same as on other terminals by default, but since
dpi
is "not automatically probed" as described in the docs, i would expect it to work with dpi set to 226 on my machine.