Michael Cook’s Place

Bits of Genius in a Sea of Mediocrity

Michael Cook’s Place Random Header Image

Character Generation, Katakana Rendering

October 1st, 2008 · No Comments

Despite spending more time with Little Cute Display, I’m still unable to get character generation working. Based on the small amount of information I have it should be working. I suspect that either the device just doesn’t support it (possible, I haven’t tested it) or I don’t have enough documentation (my best guess).

As part of this work though, I spent some time mapping which byes outside of the standard character set map to what symbols on the screen. Most of this time was spent deciphering which katakana were being displayed. This was an interesting little diversion. I’ve never looked at katakana that closely. I did this so I’d have defines that matched the characters, for no particular reason. It was a fun little task to try to locate all the symbols.

While doing this work I had quite a few problems. If I could speak Japanese it probably would have been much easier but I ran into a few surprises I wasn’t expecting. There are two sets of the katakana for the vowels (and three other katakana). One set is shorter than all the other characters.

The biggest problem I had was locating some of the shapes. The characters are actually half-width kana which I didn’t realize (and may have made the task easier). The LCD seems to use Shift JIS (the character ordering and placement looks about the same, I didn’t check that they matched up), with some extra characters (division sign, some greek letters, etc). While trying to locate some of the katakana I simply had confusion problems due to the small size on the screen (5×7 pixels) such as the difference between (ku) and (ke).

But the big thing I noticed was the way the fonts were rendered. I was looking at things for a while rendered on Windows XP on FireFox and I was having a lot of trouble finding some characters. I decided to try looking at things on my Mac (Safari, OS 10.5) and things look completely different. Some characters ( - ki) look very different between the two OSes. More than that, the characters on OS X look very smooth and clean, where on Windows they looked more iconic (perhaps it was a bitmap font).

It was an interesting challenge. I’ve never really looked at katakana that closely before. Some of them I could already recognize ( - ri - being the main one). It would have made my job so much easier if there was a logical reason for the way the characters look (similar shapes with one little extra “nib” or stroke can mean totally different things, similar sounds don’t look the same). I realize this is due to the development of the language (and it’s not like the letters with similar sounds in our alphabet are similar), but the logical part of me kept trying to work that way and it probably slowed me down.

Now that I’ve written this post and I’m reading it over, I’m glad that Wikipedia didn’t show the characters with underlines (even though they were links) as this post has them, that probably would have only confused me more. I’m also impressed with Wordpress’s ability to handle these characters. All I had to do was copy and paste them in and everything worked.

Tags: Mac · Programming