I tried with reversing the flag in the code when doing RTOL on a Mac, but it does not work.
The text gets overlapped means
1/2
and
1000
gets overlapped.

i guess there is problem while drawing text with the alignment flags on Mac OS X in RTOL locale.

As far as their positions are concerned their calculations are straightforward. I dont think so there is any problem.

The most notable thing is that this works fine on windows. I agree that the windows architecture is different but then the question is this problem should be there on windows for RTOL if the calculation is wrong.