Font Rendering: SDF Kerning and vertical Tracking incorrect
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official 4.2
Version: 4.2.0.2067 on .NET 8.0.2
Platform(s): Windows 11
Describe the bug
Font kerning/tracking for SDF fonts is incorrect, letters are squished together and letters dance up and down on each line.
To Reproduce
- download font Baj Jamjuree from Google Fonts
- create SDF font, size 20 or 24
- create a text block and zoom in (sometimes easier to see at runtime)
In editor (red annotation to show the vertical issues)
At runtime:
Expected behavior
Kerning is as defined and hinted in the font. Tracking and scanning is as defined and hinted in the font.
Additional context
Related to #2171 (there's a sample project there)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the sample project referenced in related issue #2171 and reproduce the SDF font problem using Baj Jamjuree at size 20 or 24, both in the editor and at runtime. Compare kerning, tracking, and vertical placement with the expected font behavior; done means the letters no longer compress or shift vertically between lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100