You are browsing as a guest. Sign up (or log in) to start making projects!

text to desmos

  • 4 Devlogs
  • 19 Total hours

Converting text to polygons for easy use in desmos graphs

Open comments for this post

2h 44m 19s logged

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.

0
0
9
Open comments for this post

5h 45m 14s logged

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?

0
0
4
Open comments for this post

8h 48m 10s logged

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:

  • keep the parsed font loaded on the Rust side
  • detect and decompress .woff files
  • actually convert it to polygon
  • allow specifying fallback fonts
  • find out how to allow more formatted text (italic/bold, line breaks, centering, etc)
0
0
6

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…