-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hey, thanks for this implementation. I'm implementing an IMGUI library prototype and wanted to try MSDF. Your project gave me a start so that I could compare against something.
Unfortunately, an MSDF atlas cannot be used with the legacy text system without having vertical alignment issues. Look at this screenshot:

The 'd' letter is noticeably lower than the other text. I put rectangles there to make it really obvious, but it's noticeable without them as well.
The issue stems from the legacy text system's use of font hinting behind the scenes. It helps when glyphs are rasterized, but breaks apart when any kind of SDF is used. Unfortunately, it cannot be changed.
I checked out TextMeshPro and the newest Unity TextCore module - they both allow for no hinting but don't have public methods for easy high-level text layout. All the higher-level components are internal, and the only thing they made public is FontEngine, which is very low-level. I basically have to reimplement the whole TextMeshPro layout code. This is how it looks with no hinting:
