I've changed my mind on this a few times after fixing a broken algorithm implementation, but I'm starting to think a two pass approach to polygonization - fixed-step De Casteljau and then line simplification (using Visvalingam-Whyatt) - is almost always better for curve quality compared to adaptive subdivision. adaptive subdivision (in three-text's case the algorithm from Anti-Grain Geometry) makes locally optimal decisions per curve segment, but the oversample-then-simplify approach distributes points more evenly across the whole contour. and the cost to compute either is trivial. but it's possible I'll change my mind again, maybe when multiple glyphs with very different curvature are involved...
in 2D (even in 3D space) this is a different set of problems because you can tessellate based on zoom cheaply (like what Vello does), or do something like Loop-Blinn to fill in curves with a fragment shader. but I haven't yet found a good way to produce text as real geometry - extruded, lit, deformable - in a compute shader, and suspect it's not a very realistic idea

@tribby I'm not sure where the compute shader comes in to the picture, but extrusion is handled well by SDFs.

Two or three lines of code is needed to turn the 2D SDF for a glyph into a 3D extrusion. You can then raymarch it.

Rendering that geometry to a mesh is a bit less elegant: https://github.com/deadsy/sdfx

Don't pay too much attention to me though, I haven't really played with SDFs.

@theohonohan thank you! I’ve wanted to learn more about SDF in general. there may ultimately be a couple of (tree-shakable, hopefully not too bloated) pipelines in three-text for different kinds of rendering. M/SDF can’t seem to get quite sharp enough for my taste with the libraries I’ve tried so far, but we are just a few weeks away from the loop-blinn patent expiring for those who might want infinitely scalable flat text..
@tribby Triangle quality isn't great in either. I suppose doesn't matter here, but you could imagine a mesh without slivers, possibly achieving that by adding Steiner points.
@theohonohan interesting! I have been getting familiar with CDT via clipper2’s new triangulation module, but it doesn’t feature steiner points or refinement. there are probably tradeoffs to consider as I mostly care about speed and exterior/contour quality, but I’m still making changes to three-text based on things you told me about ages ago, so I have good reason to look into this one too 😅
@tribby Well I really don't imagine your "bad" triangles will ever be a problem, since you're not running finite element simulations on the mesh.
@theohonohan I guess it depends on how the steiner points get placed, but I wonder if it could be useful for better looking / more uniform deformation. the project did after all begin with a deeply american urge to shoot at text 😅