text to desmos
- 4 Devlogs
- 19 Total hours
Converting text to polygons for easy use in desmos graphs
Converting text to polygons for easy use in desmos graphs
Cleaned up the code and implemented a makeshift curve sampler. Currently I’m taking a fixed number of samples for each bezier segment in the glyph splines, so the resolution is inconsistent and there’s way more points than necessary in some places.
Can now load .woff and .woff2 fonts, and the decompressed font & its shaper are stored globally instead of re-parsing every text update. I’m just outputting control points now, but soon I can finally implement the actual sampling. Also, something weird is going on with the Fira code variable font?
Drawing text to an svg path. Also set up a debug ui to make sure the text shaping (glyph layout, ligatures, etc) is being done properly. For that, I ended up using a recent HarfBuzz port with basically no docs, which was really fun and not at all hard to understand. I also spent a lot of time searching up browser apis on MDN, and figuring out how to work with async.
Next up:
First commit, I finished setting up the tooling and a template for svelte/wasm. Now time to go learn svelte