Ben NanoNote fonts

From Qi
Jump to: navigation, search

The Linux frame buffer console fbcon supports black and white fonts.


Contents

[edit] Black and white fonts

The standard way to get smaller fonts like the FAQ says is to use loadfont with PCF fonts.

As a curiosity, here is a very simple program to load fonts from .pnm files that can be created by GIMP: setfont.tar.bz2. It includes a 5x10 font for a 64x24 character terminal, although text is challenging to read when rendered with such a small font.

[edit] 32-bit color fonts

There are two problems with small fonts:

  1. The Ben NanoNote LCD is unusual
  2. Small matrices such as a 4x8 pixel glyph matrix do not have enough detail to accurately model glyphs such as "M"

Both problems can be addressed with SubLCD techniques. You can try this on your NanoNote like this:

  1. Set up the toolchain
cd /tmp/
wget http://amadeus.dist.ro/setfont/setfont2.tar.bz2
tar xjf setfont2.tar.bz2
cd setfont2/

The directory now contains:

[edit] To patch your kernel

cd $OPENWRT_XBURST
nice -19 make target/linux/compile V=99  # to create "build_dir"
cd build_dir/linux-xburst_qi_lb60/linux-2.6.32.10
patch -p0 < /tmp/setfont2/fbcon-color-fonts.patch
cd -
nice -19 make target/linux/install V=99
scp bin/xburst/openwrt-xburst-qi_lb60-uImage.bin root@172.16.0.3:/boot/uImage

[edit] To build the userspace utility

Edit STAGING_DIR in Makefile to reflect the location your toolchain.

make
scp setfont2 root@172.16.0.3:/usr/sbin

[edit] Finally

  1. Copy the userspace utility and the font to the NanoNote
  2. Boot the NanoNote with its new kernel
setfont2 path-to-font.pnm

Note that only the current virtual console will be affected. Other consoles won't use the font until you run this command on those consoles as well.

[edit] Limitations

[edit] Screenshots

The old stock 8x16 font. 40x15 terminal
A 5x10 Black and white font. 64x24 terminal
A 6x10 32-bit color font. 53x24 terminal
A 4x8 32-bit color font. 80x30 terminal

The following two shots are by fbgrab so you can see what's really in the NanoNote's frame buffer in order to produce the SubLCD effects.

Un-fuzzy-4x8-font-mc.png Un-fuzzy-4x8-font-openwrt-logo.png

Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export