Alternative text input methods on Android – Swype and ShapeWriter

I recently heard about the ShapeWriter (http://www.shapewriter.com/) alternate text input method for Android devices and read some glowing reviews of it so thought I’d give it a try.

If you haven’t already seen or heard about ShapeWriter, it’s an alternate virtual keyboard for mobile devices which lets you type words by dragging your finger from one key to another rather than pressing each individual key. Each time you release your finger, that marks the end of the word and a space is inserted. You can still press each individual key if you want, so you don’t lose any functionality, but you obviously don’t benefit from the big speed increases you can get from using the new finger dragging method.

In use I found that it’s definitely quicker (for me at least) than pressing each individual key and my word input rate has gone up.

Since installing ShapeWriter I also heard about another very similar alternate keyboard called Swype which is currently in beta phase (http://beta.swype.com). I’ve installed both of them so will compare the two over the next few weeks.

Beware when filtering TrueType font resources in Maven

I’ve just come up against an interesting problem while loading custom TrueType fonts bundled with a Java Swing GUI built using Maven.

Initially, for simplicity and because I’d never actually tried creating custom fonts from TTF files before, I loaded the TTF file from an absolute location i.e. not relative to the JAR classpath. Everything worked fine so I proceeded to package the TTF file as a regular resource file packaged into my JAR from the standard Maven src/main/resources directory, and changed the font loading code to load it relative to the JAR classpath. That’s when strange things started to happen…

I noticed that certain glyphs in the font were very subtlely wrong. For example, the top of all “S” glyphs was squashed slightly. I switched my code back to using an absolute file path (referencing the /src/main/resources location) and everything looked fine again. That got me wondering if the font file could be getting corrupted somehow when being packaged into the JAR.

And then it dawned on me… I’m filtering other resources so could that be the problem?

You bet it was!

It turns out that the TTF file was being filtered when packaged into the JAR. As soon as I excluded TTF files from this filtering, everything worked as expected again.

So, the moral of this is watch out for resource filtering when using TrueType font files (or any other file that could potentially be damaged by undesirable filtering).

I’m loving MiG Layout :-)

My Java Swing layout manager of choice to date has been the good old GridBagLayout (with a healthy dose of BorderLayout where applicable). However, there’s a new kid on the block (well, at least on my block)… and that is the MiG Layout (http://www.miglayout.com/)

I heard about MiG Layout ages ago and from what I read about it, it sounded pretty cool. But I’d never actually used it – until now.

I’ve just been doing some GUI work which required some hairy layout management so I thought I’d give MiG Layout a try to see how it fared. And I’m glad to report that it handled it with ease. So I’d definitely recommend you give it a try if you haven’t already.

And the blue line around the airport baggage carousel is for…

I’ve just returned from a smashing holiday to Tunisia with my family only to be completely amazed by the stupidity of people at the airport baggage carousel! The thing is like a magnet for stupid people.

There’s a line drawn on the floor around the carousel which you’re supposed to stand behind for a reason – so everyone can see the cases and bags on the carousel clearly, and when you can see your bag you can approach the carousel easily, collect your bag, and be on your way.

But no, idiots insist on standing as close to the carousel as possible so no-one else can see the approaching bags until they’re right in front of you! Grrrrrr!