The font was created using my homemade small font designer (see external links). It includes all letters (uppercase/lowercase), numbers, and most punctuation. The font weights in at 383 bytes.
The application has the ability to unpack this font, and use it to write a message on an LCD display.
It also performs word-wrapping.
Final program size: 930 bytes
The project was built using a Atmega328pu, and Nokia 5110 LCd display on a Spark fun dev board.
The board is custom-made (see attached Eagle CAD and images), but the project will function on a Arduino with the same microcontroller. The microcontroller is programmed with a USB Tiny.
The software was written in assembly with Atmel Studio 7- initial versions written in C were far too large.
Character Development and Compression
The font was designed using our own Small Font Designer, producing variable-width characters 8 pixels tall.
Since each character is 8 pixels tall, each will fit evenly into bytes. The characters are packed to indicate their width, and each active pixel.
A => 5 wide, bytes: 0114a74620 width | data | data | data | data | data 0x05, 0x01, 0x14, 0xa7, 0x46, 0x20 These bytes expand to: . . . . . . . X . . . X . X . . X . X . . X X X . X . . . X X . . . X . . . . . Which kinda looks like an 'A'.
Messages are written to the display buffer letter-by-letter. The current character is loaded found in the program (slowly looping to save space), decompressed to individual pixels in 64-byte buffer, and written to the LCD display buffer.
Read More: 1K LCD Tinyfont