Jason (jcreed) wrote,
Jason
jcreed

Okay, for those of you who at least know how to use FontForge minimally, (and if you've ever used Fontographer for more than two seconds, you certainly do) the following should actually be of some use.

Download the following postscript file:
http://www-2.cs.cmu.edu/~jcreed/font/typealyzer-template.ps

Print it out.

Draw some glyphs in the boxes. Stay away from the edges a little. Each box is labelled with three characters: the printable ASCII characters consist of no more than 96, so you can do all of ASCII on three of these printed sheets.

Scan it in and save it as a .png image.
For best results, make sure you have the image in landscape (not portrait) orientation, and try to keep the off-axis rotation under 5 degrees. I suspect the glyphs might get out of order at much more than that. Nonetheless finding where the glyphs are seems to be rather robust now.

Now go to
http://existentialtype.org/cgi-bin/typealyzer.pl
and upload the .png. Now, and here's where I don't remember all my freshman year web fu, I suspect I might be able to get around the unfortunate consequence that it essentially says that you're downloading the perl script itself, and it is of type "perl script". Don't be fooled! I know you don't want more perl on your hard drive any more than I do. It's actually an .sfd file, the format FontForge uses. Just save it and rename it, and open it up in FontForge. Hopefully all your glyphs have been loaded, autotraced, and assigned rather small constant (but not unreasonable) left and right sidebearings, and put in the range 64-95. FontForge makes it easy to copy and paste a whole range of characters somewhere else though, so three uses of the Fontalyzer should be pretty easy to splice into one font.

Noise in the glyphs may mean that you have to snip out some noise and redo the sidebearings, but for a good font, you'd want to adjust the sidebearings by hand anyway. With only extremely minor cleanup at the end (with my current tools NO special treatment was necessary at preprocessing time: the template contains no special registration marks, and I didn't even crop it tight) here's a result.

Scanned image:

Demo image:

TTF

The thing that I found works pretty well for consistent registration is the following: I take the original bitmap file, and ask potrace to trace it. Now I have a bunch of splines. I compute all their bounding rectangles, and sort them by area. The biggest one is assumed to be the outer rectangle, and the 32 succeeding ones in size are the glyph cells. I can easily estimate rectangles from these cells by finding the northwestmost, northeastmost, etc. points of the spline around each glyph cell. This (by the power of arctan2) gives me a theta to rotate by, and I clip out like the top 20% and left and right 10% and bottom 1% of the cell to eliminate the human-directed guides. It's that simple!
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 

  • 9 comments