Evan Wallace, a Figma co-founder, writes technical articles on graphics, including GPU text rendering and real-time caustics in WebGL.
HN links his GPU text rendering article in discussions of font and vector rendering. A Figma engineer praises his preference for simple code.
> Omvlee decided to design his application to run natively on OS X. This was very smart. Although Omvlee could have reached a considerably wider audience by designing Sketch for Windows (or OS X and Windows), focusing on the Mac market was highly strategic
Sketch exists thanks to the genius of Quartz / Core Graphics. It does not have a rendering engine per se and struggles even with path ops [1].
This technical debt may soon be the end of Sketch. Because apart from Adobe, there is now Figma with smart people like Evan Wallace who can really "decide" [2][3].
With C++ core, Figma can go fully native [4], and it's puzzling why they have done this already.
[1] https://twitter.com/vmdanilov/status/892358827378696194
[2] https://www.figma.com/blog/building-a-professional-design-tool-on-the-web/
[3] https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
[4] https://twitter.com/evanwallace/status/673959396104273921
[1] and [2] sound similar to what you are describing. They still involve triangulating the shape, but the triangulation process seems much simpler than the loop and blinn paper. However, if you want to do distance based anti-aliasing rather than supersampling, things are going to get complicated again as you have to expand the shape outline to capture more pixel centers.
I don't see a straightforward way to apply this technique in a pixel shader that includes multiple curves per triangle. I feel like any attempt to do that will approach the complexity of Slug, but maybe it's my own shortcoming that I don't see it. I would love to read more detailed information on that if you have it.
[1] https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
[2] https://web.archive.org/web/20180905215805/http://www.glprogramming.com/red/chapter14.html#name13
+1 from another Figma engineer who happened to work on the text engine back in the day.
I think that Evan generally wrote code that was as simple as possible — there was no unnecessary complexity. In this case there indeed is some inherent, unavoidable complexity due to the math involved and the performance requirements, but otherwise I found our text rendering pipeline very understandable.
Evan actually wrote about it if you're curious to learn more: https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
Pretty good overview of what you asked about - https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
Other links
https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-25-rendering-vector-art-gpu
https://jcgt.org/published/0006/02/02/
Also (https://terathon.com/i3d2018_lengyel.pdf) Which was developed into a product IIRC.
Another GPU text renderer
https://github.com/hypernewbie/VEFontCache
There's been other development and some posts on Hacker News about rendering fonts on the GPU
Another example of this by Evan Wallace (founder of Figma): https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac (code: https://github.com/evanw/theta)
Not sure if they use the same, but here's an article about text rendering from the CTO of Figma: https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac