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

Add an "Auto" editor font hinting setting to match OS font rendering #31375

Merged
merged 1 commit into from
Aug 15, 2019

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Aug 14, 2019

The "Auto" setting picks the font hinting setting that best matches the operating system's font rendering settings. This font hinting setting is now the default to provide better integration with the OS.

I've also considered exposing this as a setting in DynamicFontData so that it can be used in projects, but this would break compatibility, so it'd have to wait for 4.0. Besides, adjusting font hinting to match the OS is usually not desired in games. It'd still be nice to have in non-game applications though.

We could have more accurate detection on Linux using X11 APIs (since hinting is configurable there), but I don't know how to do this. If it doesn't require too much code, help would be appreciated here 🙂

PS: I've chosen "Light" hinting on Windows, but maybe "Normal" matches ClearType rendering more?

Preview

Before (all platforms)

editor_font_hinting_normal

After (on macOS)

editor_font_hinting_none

After (on Linux and Windows)

editor_font_hinting_light

The "Auto" setting picks the font hinting setting that best matches
the operating system's font rendering settings.
This font hinting setting is now the default.
@Calinou Calinou force-pushed the add-auto-editor-font-hinting branch from 5205593 to c940d29 Compare August 14, 2019 13:57
@akien-mga akien-mga added this to the 3.2 milestone Aug 15, 2019
@akien-mga akien-mga merged commit d998dae into godotengine:master Aug 15, 2019
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the add-auto-editor-font-hinting branch January 27, 2020 18:13
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.

2 participants