Bad kerning in integrated terminal
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
This issue is related to Zed's custom renderer for Alacritty. It is not reproducible in vanilla Alacritty.
⬆️ Alacritty ⬇️ Integrated terminal in Zed
Zed config:
{
"buffer_font_family": "Iosevka Fixed",
"buffer_font_size": 11
}
Alacritty config:
[font]
normal = { family = "Iosevka Fixed" }
size = 11
Environment
Zed: v0.149.5 (Zed) OS: macOS 13.6.9 Memory: 32 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
No response
It appears to be related to non-integral character coordinates. The font in my screenshot, Iosevka, has an exact aspect ratio of 1:2. That is why characters are grouped in twos.
⬆️ When the font size is set to 11, the y positions for each character are 0, 5.5, 11, 16.5,...
⬆️ This problem does not occur when the font size is set to an even number.
I can confirm this using Cascadia Code, which has an aspect ratio of 1200:2048 (75:128), at a font size of 16. This is very apparent when drawing box characters, such as when running dust:
Removing the design label here as this doesn't seem to be something we have room to change design-wise, but instead appears to be more a rendering, potentially even GPUI-related issue.
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
This is still reproducible.
Fixed by #33345 I think
@ConradIrwin Unfortunately, there is still an issue with the character placement. Should I raise another issue?
https://github.com/user-attachments/assets/e36163ce-0614-4680-9fc1-72b0fb327aba
Zed Preview 0.195.0, Font: Iosevka, Size: 15
@alisinabh do you know if we could use a single span for rebase in this case?
@ConradIrwin I think this is the culprit. We should remove flooring that value.
I have removed it locally and this seems to be fixing the case @lixiaoyan mentioned.