Skip to content

Conversation

DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented May 9, 2025

If you use a variable font in Main Font and Main Font Bold, there is no way to tell which weight to use through the editor settings.

This defaults Main Font weight to 400 and Main Font Bold weight to 700, the default weights for Regular and Bold. Should only affect variable fonts.

The ideal would be to add a setting to control both variations and features like it's done with Code Font, but I wanted to take the easy way and use the default values. Some kind of setting could be added later.

Using Inter Variable on both Main Font and Main Font Bold

Before (everything defaults to Regular weight):

image

After (wording is slightly changed since I'm comparing it to 4.4.1 stable):

image

@DeeJayLSP DeeJayLSP requested review from a team as code owners May 9, 2025 18:04
@AThousandShips AThousandShips added this to the 4.x milestone May 9, 2025
@DeeJayLSP DeeJayLSP force-pushed the variable-weights-editor branch from d597f56 to 38726fc Compare May 9, 2025 20:02
@DeeJayLSP DeeJayLSP changed the title Editor fonts: force weights for Regular and Bold Force weights on custom editor fonts when variable May 9, 2025
@DeeJayLSP DeeJayLSP force-pushed the variable-weights-editor branch from 38726fc to 0d4d0d4 Compare May 19, 2025 02:45
@DeeJayLSP DeeJayLSP requested a review from a team as a code owner May 19, 2025 02:45
@DeeJayLSP
Copy link
Contributor Author

DeeJayLSP commented May 19, 2025

Added a description to both properties, explaining which weight will be used on each.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

@Calinou Calinou removed the usability label May 19, 2025
@akien-mga akien-mga requested a review from bruvzg June 5, 2025 09:39
@akien-mga akien-mga modified the milestones: 4.x, 4.5 Jun 5, 2025
@akien-mga akien-mga merged commit f342601 into godotengine:master Jun 5, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants