Jason (jcreed) wrote,
Jason
jcreed

My wager is nearly fulfilled.

Here's a crappy little perl script.
Here's what the printed, scribbled upon, and scanned template looks like:

Here's the TTF file. Sadly it's not generated completely automatically yet, but it's very easy. The script takes a bitmap image with exactly two gray pixels (the rest are required to be exactly black or white) at the top-left and top-right corner, respectively, of the template's outer rectangle. I just put those in by hand in photoshop just after I scanned it in as a bitmap. This is to avoid trying to solve the (probably pretty easy but boring) problem of robustly figuring out where the biggest rectangle in the image is, accounting for noise and all. The script can easily find these two pixels, figure out how to rotate and clip the image, and spits out all of the cell contents into separate png images, systematically named by their unicode values. (note: the template is actually broken, in that, after the alphabet, it doesn't follow unicode/ASCII order. I'll fix it)

Now in FontForge, with just a couple of menu commands, you can load all these images at once, and have it call your favorite autotracer (assuming your favorite autotracer is autotrace or potrace) on all of 'em, and automatically figure out plausible left and right sidebearings. I could probably try to automate that part too, but I may not bother. It's just a constant amount of human drugery for all operations: each pass is applied neatly to all characters.

Here's what the font looks like. I forgot to actually add a space character, but, hey, it's just a stupid demo.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments