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

DF font rendering causes artefacts when glyphs are composed of multiple vector shapes #6577

Open
8bitskull opened this issue May 4, 2022 · 2 comments
Labels
bug Something is not working as expected engine Issues related to the Defold engine font Issues related to font rendering/handling

Comments

@8bitskull
Copy link
Sponsor

Font consisting of multiple vector shapes:
image

Same font, with boolean union to form a single shape:
image

See this forum post for detailed writeup of the issue:
https://forum.defold.com/t/issues-with-df-fonts/63744/7

@FlexYourBrain
Copy link
Contributor

To clarify issue a bit :

When creating distance field fonts in defold, if the provided font has glyphs that have line segment intersections from multiple shapes or line segments intersecting with themselves. These intersections are visibly drawn to the font texture. Making it seem like visual artifacts.

The non defold solution: Is to clean up all the fonts glyph line segment intersections before bringing it in defold.

@JCash
Copy link
Contributor

JCash commented Oct 18, 2022

The problem is this assumption, which doesn't work with multiple paths that intersect:
https://github.com/defold/defold/blob/dev/com.dynamo.cr/com.dynamo.cr.bob/src/com/dynamo/bob/font/DistanceFieldGenerator.java#L37

@britzl britzl added bug Something is not working as expected font Issues related to font rendering/handling engine Issues related to the Defold engine labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected engine Issues related to the Defold engine font Issues related to font rendering/handling
Projects
None yet
Development

No branches or pull requests

4 participants