Font Rendering: Freetype vs Signed Distance Field


#1

Hello ,
I am working on a CAD type project where i need to render font ( which can be super zoomed, rotate,translate etc)
Below is the screenshot of my need.

Now I started with rendering font
–>using Freetype Library (parsing the .ttf font file)
–> cache the textures and glyphs corresponding to each character
–> a custom fragment shader



The result were good but was not very crisp and sharp.also there were pixelated edges when rotating and transforming text.

Next i started learning the Signed Distance field font rendering, the results seems good and promising.


–> i used a SDF texture ( font atlas) (.png format)

My doubts are that i am very confused with using Freetype and SDF:

  1. Is alone using Freetype , .ttf file and a custom shader fulfill my need?
  2. If i use the SDF method should i use the Freetype?
  3. If i wish to use a single atlas texture(.png) how would i generate the glyphs corresponding to the SDF textures ( a png file)? can Freetype do that?
  4. Is generating SDF from Freetype a good option ( speed , efficiency?)!
  5. can i use .fnt file instead of .ttf where the information of SDF atlas is already stored? would be that better?

Or what is the best and efficient method to do this???
Overall i am confused with Freetype and SDF


OpenGL + Freetype Text Rendering problems
#2

Feel free to websearch for it. Start with some of what’s already out there for this:

Also see: