Gohufont for NetBSD Console

I’ve been messing around with a late '90s Toughbook, and needed a slightly smaller font to make the 800x600 display more usable. Since Gohufont worked so well on the Parva’s OLEDs, I thought I’d give it a try on this laptop.

I used gbdfed to clean up the BDF file, then converted it to a wscons header file using bdf2wscons (the script makes an OpenBSD style header, which requires removal of a couple of lines to work with NetBSD).

To install it on your own system, just follow these directions:

  1. Download gohufont6x11.h
  2. Copy it to /usr/src/sys/dev/wsfont/
  3. Edit /usr/src/sys/dev/wsfont/wsfont.c
    Add the following lines to the rest of the font includes:
    #ifdef FONT_GOHUFONT6x11
    #define HAVE_FONT 1
    #include <dev/wsfont/gohufont6x11.h>
    Add these lines to the list of built-in fonts:
    /* Our list of built-in fonts */
    static struct font *list, builtin_fonts[] = {
    #ifdef FONT_GOHUFONT6x11
        { NULL, NULL, &GohuFont6x11, 0, 1, WSFONT_STATIC | WSFONT_BUILTIN  },
  4. Add the following line to your kernel config file:
    options FONT_GOHUFONT6x11
  5. Re-build the kernel, install, reboot
# | Published