GramEditor/gram
38
985
Fork
You've already forked gram
88

1.1.0 UI Font sizing broken #147

Closed
opened 2026年03月22日 09:59:24 +01:00 by Frysog · 14 comments

This is caused by #69

The reason they did this is because the UI font is placed into what should look like a padded container. So the font is naturally smaller than its buffer counterpart to make space around. Moreover, the UI size scale with the UI font.

The result of this change on HiDPi screen is oversized UI fonts, unreadable button description in pop up menu, oversized breadcrumb, etc...
I have to remove 4 points in UI font size to restore to 1.0.0 state, and the UI becomes ridiculously small, to the point it's impossible to use efficiently.

The only font that is working a little well with this change is Gram Mono, All other system fonts are overblown.

This is caused by https://codeberg.org/GramEditor/gram/pulls/69 The reason they did this is because the UI font is placed into what should look like a padded container. So the font is naturally smaller than its buffer counterpart to make space around. Moreover, the UI size scale with the UI font. The result of this change on HiDPi screen is oversized UI fonts, unreadable button description in pop up menu, oversized breadcrumb, etc... I have to remove 4 points in UI font size to restore to 1.0.0 state, and the UI becomes ridiculously small, to the point it's impossible to use efficiently. The only font that is working a little well with this change is Gram Mono, All other system fonts are overblown.
Owner
Copy link

I haven't seen this myself.. What OS are you on, and can you provide some screenshots perhaps?

I haven't seen this myself.. What OS are you on, and can you provide some screenshots perhaps?
Author
Copy link

Yes of course. I'm on Arch Linux. Wayland.

That is Gram 1.0.0 with GramMono:

1.0.0-grammono

That is Gram 1.1.0 with GramMono: (You can already observed that the UI font takes more place)

1.1.0-grammono

That is Gram 1.1.0 with AdwaitaMono: (This is the same disproportion with any Mono system font)

1.1.0-adwaitamono

Some layout are broken as a result:

menubroken

Yes of course. I'm on Arch Linux. Wayland. That is Gram 1.0.0 with GramMono: ![1.0.0-grammono](/attachments/1f582e34-3c22-4aa4-8de1-32c3cb76d73b) That is Gram 1.1.0 with GramMono: (You can already observed that the UI font takes more place) ![1.1.0-grammono](/attachments/361bfcc2-5706-4ba2-9147-ca42881dfffe) That is Gram 1.1.0 with AdwaitaMono: (This is the same disproportion with any Mono system font) ![1.1.0-adwaitamono](/attachments/fd7066d7-89e7-4bdd-86ce-9d7993f60a6d) Some layout are broken as a result: ![menubroken](/attachments/a94e944e-bb0e-4eb4-80cc-876d0f31febd)
Owner
Copy link

I'm leaning towards this almost being a separate issue but one highlighted by the change in #69. That the font is scaled up on some HiDPI screens to the point of breaking layout doesn't seem right to me. But fixing it is probably not that simple.

Everything looks OK on Mac even with HiDPI so I suspect that it's some kind of scaling factor applied for Wayland then..

I'm leaning towards this almost being a separate issue but one highlighted by the change in #69. That the font is scaled up on some HiDPI screens to the point of breaking layout doesn't seem right to me. But fixing it is probably not that simple. Everything looks OK on Mac even with HiDPI so I suspect that it's some kind of scaling factor applied for Wayland then..
Contributor
Copy link

This issue is subtle enough (in my humble opinion) that I didn't notice at first but, in fact, I have the same issue. Specifically, the one in the last screenshot with the text overflowing from the picker (is that what it's called) is what I observe on my system as well.
I'm on Ubuntu 24.04 running Wayland.

This issue is subtle enough (in my humble opinion) that I didn't notice at first but, in fact, I have the same issue. Specifically, the one in the last screenshot with the text overflowing from the picker (is that what it's called) is what I observe on my system as well. I'm on Ubuntu 24.04 running Wayland.
Author
Copy link

Honestly that is disturbing enough for me that I have rollbacked to 1.0.0. I am considering rebuilding from source and reverting #69 going forward. No offense to @voidedgin for proposing a PR for it. I understand both Zed choice and voidedgin frustration.

Supposing that isn't a wayland issue. Adapting all the UI components to add a correct padding would be tiresome. Maybe this new size calculation could be hidden behind a setting toggle instead?

Honestly that is disturbing enough for me that I have rollbacked to 1.0.0. I am considering rebuilding from source and reverting #69 going forward. No offense to @voidedgin for proposing a PR for it. I understand both Zed choice and voidedgin frustration. Supposing that isn't a wayland issue. Adapting all the UI components to add a correct padding would be tiresome. Maybe this new size calculation could be hidden behind a setting toggle instead?
Owner
Copy link

Yeah it’ll be tricky to fix this in a way that pleases everyone, but it definitely seems to be more of an issue on HiDPI Linux than on Mac. I think maybe if there is a HiDPI scaling factor that we can expose, that would help. Another would be to tweak the panel font size only to match the editor font size but keep the rest of the UI at the previous font scale.

Yeah it’ll be tricky to fix this in a way that pleases everyone, but it definitely seems to be more of an issue on HiDPI Linux than on Mac. I think maybe if there is a HiDPI scaling factor that we can expose, that would help. Another would be to tweak the panel font size only to match the editor font size but keep the rest of the UI at the previous font scale.
Author
Copy link

Well, the file explorer is a panel and the system font is overblown there too so hopefully the foremost scaling factor exists.

Well, the file explorer is a panel and the system font is overblown there too so hopefully the foremost scaling factor exists.

Super weird, I thought that was intentional in Gram? I got it running on my elementaryOS system, and I got a similar wonky-font problem.

image

... Wait, is it normal for icons not to show up either? I'm not on a high-dpi system, I'm on some integrated AMD GPU, so this is news to me.

Super weird, I thought that was intentional in Gram? I got it running on my elementaryOS system, and I got a similar wonky-font problem. ![image](/attachments/5be2b0d9-f277-477c-adbd-9b38af7cc597) ... Wait, is it normal for icons not to show up either? I'm not on a high-dpi system, I'm on some integrated AMD GPU, so this is news to me.
Owner
Copy link

Yes, icons are disabled by default in Gram. Sorry about that! Seems to confuse everyone. Now that it's released I don't want to change the default again and mess people's configs up even more.

Yes, icons are disabled by default in Gram. Sorry about that! Seems to confuse everyone. Now that it's released I don't want to change the default again and mess people's configs up even more.
Owner
Copy link

and yeah the fonts look better on Mac now as far as I have seen but apparently not on HiDPI Linux, which makes me think that there is some scaling factor that's making things even more complicated there.

and yeah the fonts look better on Mac now as far as I have seen but apparently not on HiDPI Linux, which makes me think that there is some scaling factor that's making things even more complicated there.

@krig wrote in #147 (comment):

Yes, icons are disabled by default in Gram. Sorry about that! Seems to confuse everyone. Now that it's released I don't want to change the default again and mess people's configs up even more.

I think there's worth on having them enabled by default, that's what pretty much every GUI code editor out there does basically, and it's quite familiar for most people. Plus, the left padding on each file tree element feels really odd

@krig wrote in https://codeberg.org/GramEditor/gram/issues/147#issuecomment-12087930: > Yes, icons are disabled by default in Gram. Sorry about that! Seems to confuse everyone. Now that it's released I don't want to change the default again and mess people's configs up even more. I think there's worth on having them enabled by default, that's what pretty much every GUI code editor out there does basically, and it's quite familiar for most people. Plus, the left padding on each file tree element feels really odd

image
Not sure this is relevant, but texts in Gram are noticeably‌ larger than Zed even if UI font family and size are the same.
image
Buffer font is also larger, but line height are the same.
Is this intentional?
I'm using Gram 1.2.0 and Zed 0.228.0 on HiDPI (1.5x) Linux Wayland.

![image](/attachments/d29b9a92-3e9d-4267-bad5-e90d92f6fe81) Not sure this is relevant, but texts in Gram are noticeably‌ larger than Zed even if UI font family and size are the same. ![image](/attachments/b8671e68-9826-4e70-8095-0eff48061558) Buffer font is also larger, but line height are the same. Is this intentional? I'm using Gram 1.2.0 and Zed 0.228.0 on HiDPI (1.5x) Linux Wayland.
344 KiB
739 KiB
Owner
Copy link

It's not intentional, no!

It's not intentional, no!
Owner
Copy link

So there was a bug here after the WGPU merge but that only affected X11. Other than that, I'm fine with how the font sizes work now.

So there was a bug here after the WGPU merge but that only affected X11. Other than that, I'm fine with how the font sizes work now.
Sign in to join this conversation.
No Branch/Tag specified
main
test/wgpu-on-mac
test-ci/failing-test-mac
test/failing-test-mac
test/build-on-22-04
test/wgpu-present-mode-mailbox
v2.1
test/altgr-fix-again
test/2.0.0-rc1
test/linux-build
test/objc2
v1.2.1
3.0.1
3.0.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GramEditor/gram#147
Reference in a new issue
GramEditor/gram
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?