Procedurally-driven "font"?

604 views Asked by At

After coming across this; I am looking for a way to procedurally generate handwriting. I have been searching the internet for about an hour; and have either not been able to deduce the proper search query, or this sort of thing is not that common. The example code in those files randomly generates pretty-looking curves and lines; as far as I can ascertain.

Some rewordings of the same question:

  • How is the problem of designing software for procedurally generating handwriting approached?
  • Where does one begin while planning algorithms required for the visual generation of handwriting?
  • How is the problem of transforming text into computer-generated handwriting achieved?
1

There are 1 answers

0
washcloth On BEST ANSWER

Handwriting is very difficult to reproduce because computers are perfect. A normal person makes every shape in their handwriting differently. Stems of h can be tall or high, g roots can also be of different length. One would immediately say to randomize it, but in computers nothing is ever random, it all follows an algorithm.

How is the problem of designing software for procedurally generating handwriting approached?

It is approached very vaguely by creating a font. In reality what that software you saw was doing was drawing out a font because every letter was the same.

Where does one begin while planning algorithms required for the visual generation of handwriting?

The only way to make it very realistic is to know one writes. You may not notice it but your muscles move the pencil left and right even if you think your holding the pencil firmly. The paper moves effecting the shape, the size of your hand, and how fast your writing determines what it looks like, if you write allot your hand gets tired also effecting what your writing looks like.

A very vague, somewhat hard example:

You can map the "bots" speed of its hand by integrating any equation. Making a random equation gives you different movment speed and integrating it gives you a position.

For example:

By let x = current letter and f(x) = (1/3)x^3. f(x) will tell you a position and x^2 will give you some number that could be calculated to change the formation of your letter.

A better start integration is the integral of 4 as its a constant. Everything else can be added to your integration equation to try to simulate a human hand. As you might multiply by delta time to get a spacing between your letters.

How is the problem of transforming text into computer-generated handwriting achieved?

An image library can be done once your algorithms are straight the data can be processed through a library to create and image. The images can be placed on a grid where each grid element is a letter.


I really hope you know what your getting yourself into here. Creating a computer to do human like activies like a human is very very hard to accomplish.