The problem I'm having is... Well, here's the code:
The text should appear at 0,0 at the top-left of screen. It does. Its x-position is accurate, but its y-position is +2 in error.
Additionally, al_get_text_dimensions(...) returns an erroneous y offset and a height that's greater than what it should be. The width and x offset it returns are accurate.
The reason I have to come here and ask is because if I don't figure out why it does this then I'll have to write some code to examine the font myself and get the correct x/y offset/width/height for each font type.
If that wasn't enough, I also have to report that when I use ALLEGRO_ALIGN_CENTRE in al_draw_text(...) it centers correctly horizontally but not vertically. In fact, I don't think it even tries to center vertically.
So there appears to be some screwy vertical/y-axis bugs.
On the plus-side, if I can't fix this then I can just convert some win32 code I wrote over to allegro - all i gotta do is replace gdi calls with allegro. (I was loading my fonts from bitmap files.)
I'm using Allegro 5.0.7 binaries.
Don't know about the y offset. Perhaps it is part of the font?
ALLEGRO_ALIGN_LEFT/CENTRE/RIGHT only align horizontally.
Most TTF fonts are not pixel-perfect. You'll almost certainly have to adjust your coordinates to take into account the nuances of each font you use.
Do you have a screenshot and is that .ttf available somewhere?