Feel free to websearch for it. Start with some of what’s already out there for this:
- Freetype: create Signed Distance Field based font
- Freetype GL - A C OpenGL Freetype engine
(for example, see: distance-field*.{h,c} and edtaa3func : Distance field computation) - makeglfont - A small utility that creates a signed distance field PNG from a TrueType or an OpenType font file.
- Anti-aliased Euclidean distance transform
- Font Rendering is Getting Interesting
Also see: