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

Imported fonts blurry and cut off #56019

Closed
markdibarry opened this issue Dec 17, 2021 · 4 comments
Closed

Imported fonts blurry and cut off #56019

markdibarry opened this issue Dec 17, 2021 · 4 comments

Comments

@markdibarry
Copy link
Contributor

markdibarry commented Dec 17, 2021

Godot version

4.0.dev (58712e9)

System information

Windows 10, Vulkan

Issue description

Fonts added show correctly in the Font Data preview tab, and when running the project, but are rendered incorrectly in the editor.
Anti-aliasing is off.

image

Steps to reproduce

  1. Create a new project.
  2. Create a new Label node.
  3. Create a new Font Resource in the Theme Overrides tab.
  4. Add a font to the Font Data tab.
  5. Make sure it's imported with anti-aliasing off.
  6. Type some letters.

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Dec 17, 2021

This is likely a duplicate of #33968. If you use the canvas_items or viewport stretch mode, the issue will go away in the running project when using an integer scale factor (DynamicFont oversampling must also be enabled when using canvas_items). However, this can't be fixed in the editor as fonts can't be re-rasterized every time you zoom in and out (it would be too slow).

PS: Disabling anti-aliasing will not disable filtering when rendering the font (it's an entirely separate thing). To fix this issue in the editor, the font should be rendered with filtering disabled, but I'm not sure if there is a way to do this in master. cc @bruvzg

@Calinou Calinou added this to the 4.0 milestone Dec 17, 2021
@markdibarry
Copy link
Contributor Author

I've reloaded the current project twice. Once with "Snap 2d Transforms To Pixel" selected, and once with "Snap 2d Vertices To Pixel". Both times with stretch mode viewport, and keep aspect.
Note that (unlike the linked issues) while the edges of the characters have hard cutoffs, the insides of each character isn't constrained to a pixel block, but rather blurs between them.
image

@KoBeWi
Copy link
Member

KoBeWi commented Apr 9, 2022

Is this still valid in newest master/alpha 6? If yes, provide an example font with this problem.

@KoBeWi KoBeWi moved this to To Assess in 4.x Priority Issues Apr 9, 2022
@markdibarry
Copy link
Contributor Author

Old issue. I haven't had this issue in awhile, so closing.

Repository owner moved this from To Assess to Done in 4.x Priority Issues Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants