News for hackers. Stuff that matters.
Re:Build Your Own Text Editor by scotty79 on Sunday January 10, 2021 @12:18PM (#25716857)
There's super interesting super-fast very high quality font rendering technique on GPU using extremely simple fragment shader and low-res prerendered texture that contains 3-channel signed distance field.

https://youtu.be/6l_oSHWFbb0

That distance fields encoded in the texture are really freaky to capture sharp corners as median of three of them when texture gets interpolated:

https://github.com/copperspice/cs_paint/blob/master/demo/res...

Re:Build Your Own Text Editor by scotty79 on Sunday January 10, 2021 @04:00PM (#25719753)
Apparently it's called MSDF fonts and you can read about how to use it practice here

https://css-tricks.com/techniques-for-rendering-text-with-we...