Aaron Poffenberger

openbsd -- free * functional * secure

In my previous blog post I wrote about adding a boot logo to a Lenovo ThinkPad. Once I figured out how to do it, the question about which logo to use.

Finding the Right Logo

As noted in the previous blog post, Lenovo limits LOGO1 to 640x480, but then forces the image to fit the full size of your laptop screen. For this HOWTO I used my ThinkPad T450s which has a 14.1 inch screen. It took a bit of trial and error to find the right logo, but that's a story for another blog post. My first attempts were based on OpenBSD artwork. Using [ppuf200X181.gif] as a base with a bit of ImageMagic help produced a very respectable boot image:

convert ppuf200X181.gif -background black -gravity center -extent 640x480 LOGO1.GIF

But again, when Lenovo boot with a logo, they scale it up to fit the screen. I didn't like the soft edges.

After trying multiple various other options, I took another tack. I decided to create a text-only logo as a gif.

A Text Logo

Both ImageMagick and netpbm support creating images from text. My [first] go was with ImageMagick:

convert -font Go-Mono -background black -fill white -pointsize 72 -gravity center -extent 640x480 label:"OpenBSD" LOGO1.gif

It looks pretty good but as I watched the computer boot with its spiffy new console font, Spleen, I had a better idea.

Logo Spleen'n

Spleen is available as a bitmap font in Glyph Bitmap Distribution Format (BDF), and Macintosh dfont format. ImageMagick didn't know what to do with it, and I didn't have any idea how to make the font palatable to it. I switched to using [netpbm] from packages. If you're not familiar with netpbm, you should get to know it. It's a collection of small graphics utilities designed to work like Unix utilities. There's no fancy gui like in The Gimp. It doesn't even have ImageMagick's display to view images. It works on images via pipelines.

Initially I made the image step by step via the command line, but my preferred tool for these kind of projects is make(1). It's a simple process of several steps:

  1. Make a black background,
  2. Make the foreground using the text to display,
  3. Change the colors of the text (initally black on white),
  4. Scale the foreground image,
  5. Layer the foreground over the background,
  6. Convert to gif.

The steps can be found in the Makefile.

Executing make from the command line will download the font into the current directory and make the logo (screenshot).

The displayed text can be set by prepending make with the variable TEXT. New lines can be separated with \n. The text can also be centered elsewhere within the image, but that's an exercise left to the reader, but here's a hint.