Hello,
I've been working on an analogue watch which has a combination of ticks and only the digits 12,3, 6 and 9 which are all at the edges of the clock screen.
I am aware of the fact that text is drawn from the top left of the position you specify and that you have to adjust by half the font height; so why is it that the 3 and 9 work perfectly (for all fonts):-
// lHeight is the font height of the largeFont divided by 2 dc.drawText(screenWidth-3, (screenHeight/2)-lHeight, largeFont, "3", Graphics.TEXT_JUSTIFY_RIGHT); dc.drawText(3, (screenHeight/2)-lHeight, largeFont, "9", Graphics.TEXT_JUSTIFY_LEFT);
But the 6 and 12 does not, and vary inconsistently across devices. Sometimes they are too high, or too low, or a combination of both...
dc.drawText((screenWidth/2), (0-lHeight*0.5), largeFont, "12", Graphics.TEXT_JUSTIFY_CENTER); dc.drawText(screenWidth/2, (screenHeight-lHeight*2), largeFont, "6", Graphics.TEXT_JUSTIFY_CENTER);
Is there something else, like a trick that I'm missing? Please advise and thanks in advance.
Regards