Building Up Unicode Characters One Bit At A Time

The range of characters that can be represented by Unicode is truly bewildering. If there’s a symbol that was ever used to represent a sound or a concept anywhere in the world, chances are pretty good that you can find it somewhere in Unicode. But can many of us recall the proper keyboard calisthenics needed to call forth a particular character at will? Probably not, which is where this Unicode binary input terminal may offer some relief.

“Surely they can’t be suggesting that entering Unicode characters as a sequence of bytes using toggle switches is somehow easier than looking up the numpad shortcut?” we hear you cry. No, but we suspect that’s hardly [Stephen Holdaway]’s intention with this build. Rather, it seems geared specifically at making the process of keying in Unicode harder, but cooler; after all, it was originally his intention to enter this in last year’s Odd Inputs and Peculiar Peripherals contest. [Stephen] didn’t feel it was quite ready at the time, but now we’ve got a chance to give this project a once-over.

The idea is simple: a bank of eight toggle switches (with LEDs, of course) is used to compose the desired UTF-8 character, which is made up of one to four bytes. Each byte is added to a buffer with a separate “shift/clear” momentary toggle, and eventually sent out over USB with a flick of the “send” toggle. [Stephen] thoughtfully included a tiny LCD screen to keep track of the character being composed, so you know what you’re sending down the line. Behind the handsome brushed aluminum panel, a Pi Pico runs the show, drawing glyphs from an SD card containing 200 MB of True Type Font files.

At the end of the day, it’s tempting to look at this as an attractive but essentially useless project. We beg to differ, though — there’s a lot to learn about Unicode, and [Stephen] certainly knocked that off his bucket list with this build. There’s also something wonderfully tactile about this interface, and we’d imagine that composing each codepoint is pretty illustrative of how UTF-8 is organized. Sounds like an all-around win to us.

Modifying Old Fonts In The Name Of Baseball

Baseball is in full swing again, and having recently accepted a position with Major League Baseball, [Ty Porter] is warming up with a big contribution to the MLB LED Scoreboard project — modifying 20-some old fonts to support baseball’s ‘ꓘ’ character that indicates a special strikeout with a called third strike (meaning the batter didn’t take a swing).

The problem is that Major League Baseball-the-entity recently deprecated the original data source for the scoreboard project. This called for a huge refactor of the codebase, including previously-patched fonts which were now showing either the font’s default no-character character, or nothing at all.

Fortunately, BDF font files are fairly human-readable and make reference to bitmap, which is an actual bitmap in hex. [Ty] settled on Unicode A4D8 (ꓘ), a character from the Tibeto-Burman language Lisu that certainly looks good enough to this baseball fan. Then it became a matter of mirroring the bitmap for ‘K’. [Ty] tried a few things like reversing the nibbles and looking up each one in a table, but that also mirrors the padding, which is bad news.

Then he tried not reversing the nibbles and just looked them up in a table, but this approach dropped and added bits unintentionally. Finally, he tried reversing the order, looking up the reversed nibble, and shifting each byte until there was no padding. This worked for most of the 20 fonts [Ty] patched. The others fell in line with some manual work.

Not much of a baseball fan? You’re almost guaranteed to like this one, especially if you hate mayo.

Can You Identify This Mystery Unicode Glyph?

For anyone old enough to have worked with the hell of multiple incompatible character sets, Unicode has been a liberation; a true One Character Set To Contain Them All. We have so many Unicode characters to play with that there’s a fascinating pursuit in itself in probing at the obscure corners of what can be rendered on screen as a Unicode glyph. With so many disparate character sets having been brought together to make the Unicode standard there are plenty of unusual characters to choose from, and it’s one of them that [Jonathan Chan] has examined in detail.

U+237C ⍼, or the right angle with downwards zigzag arrow, is a mysterious Unicode symbol with no known use and from an unknown origin. XKCD featured it as a spoof “Larry Potter”, but as [Jonathan]’s analysis shows it’s proving impossible to narrow down where it came from. Mystical cult symbol? Or perhaps fiscal growth in an economy in which time runs downwards? Either way, when its lineage has been traced into the early 1990s with no answer to the question it appears that there may be a story behind it.

Hackaday readers never cease to amaze us with the breadth of their knowledge, ingenuity, and experience, so we think it’s not impossible that among you there may be people who will turn and pull a dusty computer manual from the shelf to give us the story behind this elusive glyph. We’d love to hear in the comments below.

Meanwhile if Unicode sparks your interest, we’ve given it a close look in the past.

Thanks [Jonty] for the tip.

An Entire Game Inside Of A Font

Where’s the last place you’d expect to be able to play a game on your computer? The word processing program? Image editor? How about your text editor? That’s right — you can fight your Fontemons in any program that makes use of fonts, because mad genius [Michael Mulet] has created a game that exists entirely within a single Open Type font file.

[Michael] has harnessed the power of ligatures to create a choose-your-own-adventure-style turn-based game that pokes fun at both Pokemon and various typeface names. You start by choosing between Papyromaniac, Verdanta, and Proggito and face off against enemies like Helvetikhan and Scourier.

This works because there are many ways to draw glyphs on a screen. [Michael] chose Type 2 Charstrings, which is a vector graphics format that Adobe created for PostScript. It can draw pixels with a series of move specifications that tell it to draw up, to the right, and then back down before closing off the pixel with an implicit operator that draws from the starting point to the ending point. [Michael] was able to create two shades of gray by drawing smaller versions of the pixels and making the image by combining white and black pixels.

If you just want to play the game, you can either download the .otf file or just try it out in the browser. You’re supposed to use ‘a’ and ‘b’ to make choices that advance the game, but we soon discovered that spamming other keys like ‘v’ and Enter will lead to strange places. If you play it straight, it takes about 20 minutes, but there are enough secrets built in to make it last five times as long. [Michael] was kind enough to create a tutorial for making font-based games, but if you just want to get going, the game engine is open source.

What other fun things can you do on that locked-down work computer? If it has Excel, you can use it to do animation or just kick back and watch a movie.

How To Create TrueType From An Image

making-truetype-fonts-from-images

[Viacheslav] wanted his virtual terminal to have the look of a DEC VT220. He was unable to find a font set that looked just right so he set out to make his own TrueType font. He managed to find a sample image of the glyphs that the VT220 used as fonts. Using a collection of free software he sliced the image into 256 different parts, resized and converted to one-bit index images, and converted these to vector graphics. This was accomplished with a bit of python, an image tracing program, and font editor called FontForge.

Take some time to dabble with these font tools. With an adequate sample you should be able to reproduce any font set. We won’t achieve anything as sophisticated as the font printed with bacteria, but this will be a start in the right direction.