Use the best available braille

Unicode character support in fonts beyond the standard “western” letters and punctuation is a wild and largely unexplored territory.  Font designers can be a little more free and have a little more fun because those characters are so rarely used.  After all, how often do you “type in” a letter that’s not on your keyboard?  Case in point, see my old blog post “Use the Best Available Snowman” to see a number of variations of the Snowman glyph.

snowmen
The same Unicode ‘snowman’ glyph (0x2603) rendered in different fonts

 

In puzzle design, I frequently find myself in the position of needing to type in braille.  The way most people typically do both braille and semaphore is to find a font that replaces the western glyphs with pictograms.  You hit the letter “A” on the keyboard and most fonts render a letter “A” in one form or another.  Braille fonts instead render the correct dot pattern for an “A.”  Although it is easy to use this sort of font, you get a lot more variation and flexibility if you venture out in the wilds of Unicode.

One interesting thing about Unicode is that they’ve designated a whole page of 256 characters devoted to braille.  This means that font designers, if they want to, can include both western letters (A-Z, etc.) and braille in the same font.  Just like fonts can vary the letter “A” with serif, sans-serif, formal script-like letters, jokey comic letters, and so on, the braille dot patterns can have similar differences and artistic flourishes.  Let’s take a look at a few examples.  These are of the letter “T,” which I think is a good example since it has pips that span both rows and columns.  Also, it looks like a Tetris piece.

braille_variants
The same Unicode of the braille letter ‘T’ (0x281E) rendered in different fonts

 

I particularly like the square braille glyphs contained in DejaVu Sans.

The big problem with Unicode “letters” beyond the ones you can type with the keyboard is that they’re a pain to enter.  On the Mac, I first need to bring up the character palette.

show_character_viewer

 

I then have to dig through and find the category of character and, within that, the specific character that I’m looking for.  I must admit that the “Font Variation” section is kind of nice.  You can see at a glance how that glyph renders in the fonts you have that support it.

character_palette

 

Unfortunately, trying to pick out the braille glyph for an given letter via this method is an error-prone hide-and-seek adventure.  In puzzle design, that inaccurate and manual data entry step is the recipe for slow puzzle production and/or extra rounds of QA.

I got a little tired of this and designed a data-entry translator web page.  You type in the text you want to encode, and it spits back braille.  It even contains some extra processing options: handling capitalization, a couple of different ways of representing numbers, and ligatures for “th,” “sh,” and “ch.”

You can try out this tool for yourself at https://netninja.com/fun/braille/

netninja_braille

 

For better legibility, the braille letters it outputs are on individual gray backgrounds.  When copying and pasting into certain applications, that style may persist.  You might need to select “Paste and Match Style” when pasting.

paste_and_match_style

Posted in: Code Projects

Published by

Brian Enigma

Brian Enigma is a Portlander, manipulator of atoms & bits, minor-league blogger, and all-around great guy. He typically writes about the interesting “maker” projects he's working on, but sometimes veers off into puzzles, software, games, local news, and current events.

One thought on “Use the best available braille”

Leave a Reply

Your email address will not be published. Required fields are marked *