#209: improve text measurement and alignment for Android