-
Notifications
You must be signed in to change notification settings - Fork 689
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
macOS: Font rendering inconsistencies depending on monitor DPI #4504
Comments
I have a feeling this is caused by incorrect handling of dpi scaling. I'll look in to it some time in the coming week. |
Another discussion with screenshots + video, if it's helpful: |
Running into this on a 27" 2560x1440 external monitor. |
We should also consider tracking how the following value is set, as I feel it may be part of problem:
|
16" M2 MBP 2023 (macOS Sequoia 15.2) from #4197:
|
I was noticing lag when changing my DPI on external monitor as mirror display. Changed OSX setting to optimize for the external monitor and lag seems to be resolved. |
Just to add some information, I'm seeing something up with font rendering on Gnome desktop in external monitors as well. As described above, fonts display perfectly on the laptop itself, but are distorted on the external monitor (at its native 2560x1440 resolution). This happens regardless of where the window is opened: in the laptop screen, Ghostty text looks great; in the external monitor it doesn't. The screenshot shows, from top to bottom:
Notice that while the Ghostty and Black Box are rendering the fonts at the same size, the fonts are much more similar in Black Box and Gnome Terminal. While there are some differences in kerning (as mentioned in e.g. #3482), the main differences are in the rendering of the letters themselves, which look as though they've been compressed vertically. It's particularly visible in the 2, a, e, and o characters:
Comparing the letters as a whole, the Ghostty type seems to have lost some height: the 't' is noticeably shorter from top to bottom, and all the all letters are visibly more square (compare e.g. the word 'NORMAL' in each terminal). It only seems to affect the letterforms (and numerals) though: the git symbol, also part of the font, isn't compressed like the letters. |
My terminal lives on my large 4k monitor running at native resolution. I had to apply the following config to make the pixels line up exactly with how kitty renders text:
(Font is |
I'm not sure this issue is macOS only. I'm on Linux and think I'm observing the same issue (that was also discussed in #3842). I have two 24" 4K screens running at 2x i.e. 4 pixels per-point like is common on macOS. The font I'm using is PragmataPro. ![]() In this screen shot each is set to a font size of 9.5 and the lines are aligned to the stem of the first 'r'. The lines are:
Tilda is also GTK/freetype based. Note that even though Tilda uses a different rendering stack to Alacritty the advance of the glyphs matches up, whereas Ghostty drifts right quite quickly. Also note that the Like this comment in the discussion I've been looking at PragmataPro for over a decade and the Ghostty rendering looked off, but I didn't quite know why until investigating a bit further. |
This is totally a block 😕 |
Discussion #4487
Discussion #3842
See the discussions for more details, screenshots. I'm not sure what is causing it yet and I don't have a firm reproduction but there are enough people reporting this with different fonts I feel confident it exists. There is some font rendering issue when it comes to using Ghostty on different monitor DPIs.
I tagged this as macOS since I've only since reports on macOS.
cc @qwerasd205
The text was updated successfully, but these errors were encountered: