Adafruit IoT Printer Box Drawing Cheatsheet

I realized I wanted a cheat sheet for working with box drawing on Adafruit's Internet of Things Printer while I was playing around with making the Pachube data feed look swanky. This is my attempt to capture the character codes for the various types of possible boxes. This was gathered from a combination of the printer's test printout, Anders's work on this forum thread, and the Unicode section of Wikipedia's entry on box drawing. If you can think of additional characters or a different breakdown in the information that would make the cheat sheet more useful, please feel free to leave feedback in the comments section

Single Lines
0xDAU+250CTop Left Corner
0xBFU+2510Top Right Corner
0xC0U+2514Bottom Left Corner
0xD9U+2518Bottom Right Corner
0xC3U+251CRight Facing Tee
0xB4U+2524Left Facing Tee
0xC2U+252CBottom Facing Tee
0xC1U+2534Top Facing Tee
0xC4U+2501Horizontal Line
0xB3U+2502Vertical Line

Double Lines
0xC9U+2554Top Left Corner
0xBBU+2557Top Right Corner
0xC8U+255ABottom Left Corner
0xBCU+255DBottom Right Corner
0xCCU+2560Right Facing Tee
0xB9U+2563Left Facing Tee
0xCBU+2566Bottom Facing Tee
0xCAU+2569Top Facing Tee
0xCDU+2550Horizontal Line
0xBAU+2551Vertical Line

Double Vertical / Single Horizontal Lines
0xD6U+2553Top Left Corner
0xB7U+2556Top Right Corner
0xD3U+2559Bottom Left Corner
0xBDU+255CBottom Right Corner
0xC7U+255FRight Facing Tee
0xB6U+2562Left Facing Tee
0xD2U+2565Bottom Facing Tee
0xD0U+2568Top Facing Tee

Single Vertical / Double Horizontal Lines
0xD5U+2552Top Left Corner
0xB8U+2555Top Right Corner
0xD4U+2558Bottom Left Corner
0xBEU+255BBottom Right Corner
0xC6U+255ERight Facing Tee
0xB5U+2561Left Facing Tee
0xD1U+2564Bottom Facing Tee
0xCFU+2567Top Facing Tee

Here's some sample code that prints out each style of box line:
And the resulting printout:

No comments:

Post a Comment