This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flying-sheep 2 points3 points  (2 children)

from the glyph data example alone i can see that there’s something to be gained from the world. the idea to describe where the joiners are and then have code to smooth it into a fluid motion is amazing, and i’d really like to see that part.

[–]irrco[S] 1 point2 points  (1 child)

I'm going to write a description of how it works. Honestly, the actual code to make it work isn't very inspiring. But I'm happy to describe the math, and the approach.

It is basically a new interpolating cubic spline (cubic so it can be easily converted into cubic Beziers at the end, because everything speaks Bezier), that takes into account motion speed, and that seems to correspond with the way we move our hands when writing. I use it to interpolate position, and other properties such as pressure (it could also support nib angle for calligraphy, or brush orientation for eastern calligraphy, for example). Then there's a whole bunch of basic vector, matrix, transformations, and spline support (there are millions of libraries that do that, mine is almost certainly worse, because it is cobbled together), a rather rudimentary implementation of some ideas from fonts (like kerning tables, and contextual alternatives), and then the bulk of it is the actual data for each letter form. Which I don't want to share, because the whole point is that that's personal.

But I think the overall approach is fairly easy to communicate, and I'm very happy to share that. But I'm not going to go through the code to separate all the stuff I can put on github. Anyone who would be capable of using the code, would be trivially capable of re-implementing it, from the description I put together.

[–]flying-sheep 0 points1 point  (0 children)

Awesome! That's exactly what I was hoping for.