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 support for subpixel font rendering. #713

Open
mrDIMAS opened this issue Dec 23, 2024 · 0 comments
Open

Add support for subpixel font rendering. #713

mrDIMAS opened this issue Dec 23, 2024 · 0 comments
Labels
graphics anything graphics- and rendering-related user-interface

Comments

@mrDIMAS
Copy link
Member

mrDIMAS commented Dec 23, 2024

Subpixel font rendering results in better font quality, however it is much harder to implement correctly. The engine uses fontdue crate for rendering fonts and it already supports subpixel rendering. However produced glyph texture cannot be used as-is, instead it requires some juggling with colors in fragment shader to make it look good enough.

Straightforward implementation uses dual-source blending and it creates some ugly colored edges:

img

@mrDIMAS mrDIMAS added user-interface graphics anything graphics- and rendering-related labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphics anything graphics- and rendering-related user-interface
Projects
None yet
Development

No branches or pull requests

1 participant