creating a TrueType font from your handwriting with your scanner, your printer, and FontForge

Hey, this post is super old!
That means that installation and run instructions may not work as well, or even at all. Most of the *Ports Apple software repositories have given way to Homebrew: you may have some success on Mac (untested by me) if you brew install netpbm fontforge potrace. There’s also some font cleanup I’d recommend, like resolving overlaps, adding extrema, and rounding points to integer. One day I may update this post, but for now, I’m leaving it as is.

This looks more than a bit like my handwriting

because it is my handwriting! Sure, the spacing of the punctuation needs major work, and I could have fiddled with the baseline alignment, but it’s legible, which is more than can usually be said of my own chicken-scratch.

This process is a little fiddly, but all the parts are free, and it uses free software. This all runs from the command line. I wrote and tested this on a Mac (with some packages installed from DarwinPorts), but it should run on Linux. It might need Cygwin under Windows; I don’t know.

Software you will need:

  • a working Perl interpreter
  • NetPBM, the free graphics converter toolkit
  • FontForge, the amazing free font editor. (Yes, I said amazing. I didn’t say easy to use …)
  • autotrace or potrace so that FontForge can convert the scanned bitmaps to vectors
  • some kind of bitmap editor.

You will need to download

  • fonttrace.pl – splits up a (very particular) bitmap grid into character cells
  • chargrid.pdf – the font grid template for printing

Procedure:

  1. Print at least the first page of chargrid.pdf. The second page is guidelines that you can place under the page. This doesn’t work very well if you use thick paper.
  2. Draw your characters in the boxes. Keep well within the lines; there’s nothing clever about how fonttrace.pl splits the page up.
  3. Scan the page, making sure the page is as straight as possible and the scanner glass is spotless. You want to scan in greyscale or black and white.
  4. Crop/rotate/skew the page so the very corners of the character grid table are at the edges of the image, like this: I find it helpful at this stage to clean off any specks/macules. I also scale and threshold the image so I get a very dark image at 300-600dpi.
  5. Save the image as a Portable Bitmap (PBM). It has to be 1-bit black and white. You might want to put a new font in a new folder, as the next stage creates lots of files, and might overwrite your old work.
  6. Run fonttrace.pl like this:
    fonttrace.pl infile.pbm | sh
    If you miss out the call to the shell, it will just print out the commands it would have run to create the character tiles.
  7. This should result in a bunch of files called uniNNNN.png in the current folder, like these:
    W
    uni0057.png
    i
    uni0069.png
    s
    uni0073.png
    p
    uni0070.png

    y
    uni0079.png
  8. Fire up FontForge. You’ll want to create a New font. Now File→Import…, and use Image Template as the format. Point it at the first of the image tiles (uni0020.png), and Import.
  9. Select Edit→Select→All, then Element→Autotrace. You’ll see your characters appear in the main window.
  10. And that’s – almost – it. You’ll need to fiddle with (auto)spacing, set up some kerning tables, set the font name (in Element→Font Info … – and you’ll probably want to set the em scale to 1024, as TrueType fonts like powers of two), then File→Generate Fonts. Fontforge will throw you a bunch of warnings and suggestions, and I’d recommend reading the help to find out what they mean.

There are a couple of limitations to the process:

  • Most of the above process could be written into a FontForge script to make things easier
  • Only ASCII characters are supported, to keep the number of scanned pages simple. Sorry. I’d really like to support more. You’re free to build on this.

Lastly, a couple of extra files:

  • CrapHand2.pbm – a sample array drawn by me, gzipped for your inconvenience (and no, I don’t know why WordPress is changing the file extension to ‘pbm_’ either).
  • chargrid.ods – the OpenOffice spreadsheet used to make chargrid.pdf

Have fun! Write nicely!

tiny font victory

Yes, it’s nonsense:

But I made these character glyphs in a semi-automatic bitmap converter for tracing in scanned letters into FontForge. It’s currently only a proof of concept, but I want to expand it up to a full ASCII font, at least.

no zapf, dingbats aplenty

scruss handwriting font

Well, yes, according to YourFonts.com. You write into a special template, scan it, upload it to their website, add your signature and bank details, and you get a TTF of what you wrote. Next time, I’ll be a bit more careful with baseline  alignment.

I might mess with the alignment and kerning in FontForge, but otherwise I like it.

(via Cool Tools)

This wind study brought to you by the Canadian Nuclear Association

So there’s a new report on wind integration in Canada, written by The Conference Board of Canada. People are picking up on it, and even the doughty Refocus quotes… electricity from onshore wind is uneconomic in comparison with traditional alternatives“. Hmm.

So I read the report, and what do I find in the Preface?

As part of an ongoing initiative to investigate energy policy options and the future of the Canadian energy system, the Canadian Nuclear Association contracted The Conference Board of Canada to conduct a comparative study of various countries’ experiences with supporting and implementing large-scale wind projects.

So we’re expected to believe that the CNA would wish to have an objective and non-partisan report written on wind power, eh?

What’s with the Council of Canadians, eh?

Every couple of months, the Council of Canadians sends me a large and visually unappealing (1986 called; they want their typewriter font back) mailing, ranting about how those pesky Americans keep stealing our water.

Close reading of the mailing (which is hard, given the woeful typography) shows that the initiatives being railed at are either:

  1. run by Canadian companies, or
  2. are part of legislation voted for by Canadians.

Like most environmental things, Canada has an appalling record of looking after its abundant water. I think we think that the rest of the world thinks better of us than they do, or maybe even frankly cares about Canada.

I’m a bit worried by the CoC’s use of the n-word — nationalist — since it has unpleasant connotations, like the BNP and SNLA. Also, at least half of the mailing could be summed up as The Maude Barlow Fanzine, with only slightly lower production quality than the average zine.

And anyway, pesky Americans haven’t been stealing our water. Catherine hasn’t been sneaking any more out of the house than usual …

Just like on the old Amstrad CPC

For no really well defined reason, I used to spend hours designing really tiny bitmap fonts on my old Amstrad CPC. Now it seems that Jason Kottke has done the same thing, but in truetype format:

silkscreen, in fontforge

Silkscreen
reminds me of the HP49g‘s system fonts. You used to be able to get one of those in a scaleable form, so I wonder how similar it looks.

I’m not sure if Jason’s copyright warning would work very well:

This font is free for personal and corporate use and may be redistributed in this unmodified form on your Web site. I would ask that you not modify and then redistribute this font…although you may modify it for your own
personal use.

Back in my pre-press days, I discovered that a font becomes your design if you trivially modify just 5 glyphs. It’s an artefact of the early type producers lobbying to be able to rip each other off … not something that happens much in these DRM-obsessed days.