Skip to content
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

Godot4 script font is worse than Godot3 #58831

Closed
golddotasksquestions opened this issue Mar 6, 2022 · 7 comments · Fixed by #59367
Closed

Godot4 script font is worse than Godot3 #58831

golddotasksquestions opened this issue Mar 6, 2022 · 7 comments · Fixed by #59367

Comments

@golddotasksquestions
Copy link

golddotasksquestions commented Mar 6, 2022

Godot version

3.4.3 stable, 4.0 alpha3

System information

Win, Nvidea 765M

Issue description

Godot 4 script font is considerably wider than the Godot3 script font (in my opinion also much uglier) and there has been more line space added between script lines. As a result the Godot4 script font takes up more screen real estate on a similar readable scale.

Since I am working on a Laptop I can't give up on any screen real estate. Any additional line I can see (while I can still read it without straining my eyes) is worth gold. Any line of code which is not wrapped or cut off is worth gold.
In Godot 3 I have to bump up Main Font size to 16 and Code Font size to 17 to comfortably read. To get a similar visual result in Godot4 I have to set Main Font size to 16 and Code Font size to 18:

Godot3 script panel:
godot3_scriptpanel

Godot4 script panel:
godot4_scriptpanel

I think Godot3 is font choice is better in every way. For me this change is so bad, I really consider the Godot4 font choice and the added line space a regression.
I really hope this font choice will be reconsidered before going into beta.

If there is no chance to reconsider it, I would at least hope for an editor setting made available which allows users to easily change back to the Godot3 font and line distance. I know the option to use a custom font exists, but trying to figure out which font Godot3 used for the script panel and then trying to look for a place to download it, and then after all this manual work (who does this?) still not being able to correct the line distance, is just not the experience I would want anyone to have.

Steps to reproduce

Compare Script panel between Godot3 and Godot4

Minimal reproduction project

I used the player script form the 2D Platformer Demo here.

@Rodeo-McCabe
Copy link

For the line spacing there is an option: Editor settings -> Text Editor -> Appearance -> Whitespace -> Line Spacing
I believe the value is in pixels. It takes a few seconds for the editor to update after you change the value.

It appears to be the same setting as Editor settings -> Text Editor -> Theme -> Line Spacing, but that setting doesn't actually change anything.

For the font, I believe the old font is Source Code Pro, and you can always change it to whatever you'd like: Editor settings -> Interface -> Editor -> Code Font

@golddotasksquestions
Copy link
Author

@Rodeo-McCabe Oh yes, thank you! I probably tried this but did not see any change, so I thought it must be something else. It's actually just lagging a lot, I have to wait solid 2 seconds for the change to update.

I mentioned in the issue I know I can change the font manually. But why change what works? I don't understand why we need a font that takes more space. It's less readable. You have to increase the line spacing in order to make a wider font equally readable.

@Rodeo-McCabe
Copy link

I mentioned in the issue I know I can change the font manually. But why change what works? I don't understand why we need a font that takes more space. It's less readable. You have to increase the line spacing in order to make a wider font equally readable.

I agree, I much prefer "narrow" fonts that don't take much horizontal space. At least for monospace fonts. Changing the font is also annoying because you can't just select a standard system font that you already have, you have to find the .ttf or download one and then use that.

@Zireael07
Copy link
Contributor

Counterpoint: I find the Godot4 font much more readable (as someone with frankly poor eyesight)

@Calinou
Copy link
Member

Calinou commented Mar 6, 2022

For reference, the default font was changed here: #36198

For the font, I believe the old font is Source Code Pro

The previous font was Hack, not Source Code Pro.

Changing the font is also annoying because you can't just select a standard system font that you already have, you have to find the .ttf or download one and then use that.

Support for loading system fonts could be added, but do you really want to browse a dropdown list with hundreds (if not thousands) of fonts just to choose a single font? This is how most applications handle font loading, and I'd say it's not an ideal UX to say the least 🙂

It's actually just lagging a lot, I have to wait solid 2 seconds for the change to update.

This should be significantly improved by #53839, which was merged after 4.0alpha3 was released.

@KoBeWi KoBeWi changed the title Godot4 script front is worse than Godot3 Godot4 script font is worse than Godot3 Mar 6, 2022
@KoBeWi
Copy link
Member

KoBeWi commented Mar 6, 2022

It appears to be the same setting as Editor settings -> Text Editor -> Theme -> Line Spacing, but that setting doesn't actually change anything.

This setting was moved, so you have a leftover. Removed settings still appear in the editor if you have them in configuration file (they aren't deleted automatically).

@Calinou
Copy link
Member

Calinou commented Mar 21, 2022

I did some comparisons between Godot 4.0alpha and my personal VS Code setup (which uses the Recursive font):

JetBrains Mono size 14 in Godot (left), Recursive size 13 in VS Code (right)

image

JetBrains Mono size 13 in Godot (left), Recursive size 13 in VS Code (right)

image

JetBrains Mono size 12 in Godot (left), Recursive size 13 in VS Code (right)

image

I probably wouldn't reduce the default script editor font size – while it matches Recursive closely at size 13, it also tends to look "squished", which isn't as pleasant to read. However, it's clear that the default line spacing is now too high, so I'd consider decreasing it to 4 or even 2.

To avoid the squishing issue, we could support floating-point font sizes as browsers and Electron do. Here's an example in VS Code with the Recursive font:

simplescreenrecorder-2022-03-21_01.44.57.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants