braille_variants

Use the best available braille

Unicode char­ac­ter sup­port in fonts beyond the stan­dard “west­ern” let­ters and punc­tu­a­tion is a wild and largely unex­plored ter­ri­tory.  Font design­ers can be a lit­tle more free and have a lit­tle more fun because those char­ac­ters are so rarely used.  After all, how often do you “type in” a let­ter that’s not on your key­board?  Case in point, see my old blog post “Use the Best Available Snowman” to see a num­ber of vari­a­tions of the Snowman glyph.

snowmen
The same Unicode ‘snow­man’ glyph (0x2603) ren­dered in dif­fer­ent fonts

 

In puz­zle design, I fre­quently find myself in the posi­tion of need­ing to type in braille.  The way most peo­ple typ­i­cally do both braille and sem­a­phore is to find a font that replaces the west­ern glyphs with pic­tograms.  You hit the let­ter “A” on the key­board and most fonts ren­der a let­ter “A” in one form or another.  Braille fonts instead ren­der the cor­rect dot pat­tern for an “A.”  Although it is easy to use this sort of font, you get a lot more vari­a­tion and flex­i­bil­ity if you ven­ture out in the wilds of Unicode.

One inter­est­ing thing about Unicode is that they’ve des­ig­nated a whole page of 256 char­ac­ters devoted to braille.  This means that font design­ers, if they want to, can include both west­ern let­ters (A-Z, etc.) and braille in the same font.  Just like fonts can vary the let­ter “A” with serif, sans-serif, for­mal script-like let­ters, jokey comic let­ters, and so on, the braille dot pat­terns can have sim­i­lar dif­fer­ences and artis­tic flour­ishes.  Let’s take a look at a few exam­ples.  These are of the let­ter “T,” which I think is a good exam­ple 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 let­ter ‘T’ (0x281E) ren­dered in dif­fer­ent fonts

 

I par­tic­u­larly like the square braille glyphs con­tained in DejaVu Sans.

The big prob­lem with Unicode “let­ters” beyond the ones you can type with the key­board is that they’re a pain to enter.  On the Mac, I first need to bring up the char­ac­ter palette.

show_character_viewer

 

I then have to dig through and find the cat­e­gory of char­ac­ter and, within that, the spe­cific char­ac­ter that I’m look­ing for.  I must admit that the “Font Variation” sec­tion is kind of nice.  You can see at a glance how that glyph ren­ders in the fonts you have that sup­port it.

character_palette

 

Unfortunately, try­ing to pick out the braille glyph for an given let­ter via this method is an error-prone hide-and-seek adven­ture.  In puz­zle design, that inac­cu­rate and man­ual data entry step is the recipe for slow puz­zle pro­duc­tion and/or extra rounds of QA.

I got a lit­tle tired of this and designed a data-entry trans­la­tor web page.  You type in the text you want to encode, and it spits back braille.  It even con­tains some extra pro­cess­ing options: han­dling cap­i­tal­iza­tion, a cou­ple of dif­fer­ent ways of rep­re­sent­ing num­bers, and lig­a­tures for “th,” “sh,” and “ch.”

You can try out this tool for your­self at http://netninja.com/fun/braille/

netninja_braille

 

For bet­ter leg­i­bil­ity, the braille let­ters it out­puts are on indi­vid­ual gray back­grounds.  When copy­ing and past­ing into cer­tain appli­ca­tions, that style may per­sist.  You might need to select “Paste and Match Style” when past­ing.

paste_and_match_style

Posted in: Code Projects

One thought on “Use the best available braille

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>