In the .wezterm.lua config file, i set font_size = 13.0, but compared to other terminals like iTerm2 or the Terminal 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 be 226.0, but if i change it to that, the font is VERY large. However if i change it to about 74 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 the PPD on macs see this?
Set a font_size = 13 in .wezterm.lua, then open another Terminal like iTerm2 with the same font size and observe that the font size is larger on Wezterm.
local wezterm = require 'wezterm'
return {
-- dpi = 74.0, -- looks similar with this dpi on a Macbook Pro 13" 2017
font_size = 13.0,
font = wezterm.font("Fira Code"),
}
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.
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.
Most helpful comment
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 havingdpi==72means thatpoints==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.