"NICE TOUCH, DUDE"
After the Bézier curve clock that I built in 2021 https://habr.com/ru/articles/818873/ (in Russian), I got the idea of doing an entire handwritten font the same way. The existing formats, TTF and OpenType, don't work for this, and not because they're hard to parse. They store the outline of a letter, the boundary of a fill, while a handwritten font needs the path of the pen: the order of the strokes, their direction, where the pen leaves the paper, and how a letter joins its neighbor. None of that is in an outline, and you can't recover it from one. So I needed a format of my own: simple, but more general than the one in that clock, where any digit fit into three curves and, in theory, into two if you were willing to give up on looks. I had to start with a font editor, hw-fonts https://github.com/jef-sure/hw-fonts which I threw together in Vue with no build system at all: open index.html on your own machine and you can load a font you saved earlier or download the result of your editing. More on it in the log about the font.
The next touch was morphing fonts described by the coordinates of their dots: the dot-matrix clock https://habr.com/ru/articles/817927/ (in Russian).
Then came an intermediate step: live morphing in the Game of Life https://habr.com/ru/articles/1081830/ (in Russian).
That step led to the next one, morphing between the glyphs of a font https://github.com/jef-sure/cyd-dotview-morphing — although the font was really just a source there, and what it actually does is morph between any two matrices. The work moved from one idea to the next and left a handful of possible strategies along the way. Out of that grew a separate framework for morphing between matrices in dgx https://github.com/jef-sure/esp32-component-dgx — more on it in the log about dot morphing.
And all of it for a "nice touch." Simply because I like bringing information to life, and because I like programming as a kind of art. Microcontrollers come with their own limits, and that turns into the challenge: how do you get around them?
A warning: this is a long story. Five years have passed since the idea first came up, the experiments and the search for ideas took a long time, and if I cut the story short it stops holding together.
The story is told in the project logs, one step at a time. The page shows the newest log first; this is the order to read them in:
1. Where it started: a clock of Bézier digits
2. Three problems with curves on a microcontroller
3. A font that stores the path of the pen
4. Joining two letters with one curve
More to come.
Anton Petrusevich