Hey Everyone,
Just pushed Cinder-SDF: https://github.com/chaoticbob/Cinder-SdfText
Why Cinder-SDF?
- Texture fonts can pixelate in VR, so the standard practice so far has been to use SDF.
- Nice to have a cross platform SDF solution. This release is Windows only - I will be adding the support files for Linux and OS X later this weekend or next week. Or you could do it!
- Wanted an SDF solution that could handle corners.
How does it work?
Cinder-SDF is a gl::TextureFont
like interface wrapped around msdfgen. The SDF data is generated using FreeType curves. Cinder-SDF also uses FreeType to handle both font and glyph metrics for the basic layout operations that it has. This will be extended to whatever makes sense as far as coverage goes.
What are the current limitations?
- The SDF generator params need to be tweaked so that the render output is smoother.
- Currently, the SDF uses roughly 32x32 tiles for its data. This may change to 64x64 as params are tweaked.
- Windows sometimes blocks registry access, so the font scanner fails. Not entirely sure why this happens - probably a Windows policy issue. This manifests itself as a crash at startup.
- You may also experience some issues with system fonts where the file names are failing in the UTF16 to UTF8 path conversion. Iâm looking into why this is happening.
Give it ago, tell me what you think! Submit PRs for other platforms! Submit PRs for tweaks for improved rendering! File any bugs!
Thanks,
Hai
Obligatory Screenshot: