The problem I'm having is... Well, here's the code:
1ALLEGRO_FONT *font = al_load_ttf_font("octovill.ttf"
LOG("...could not load 'octovill.ttf'.\nEnd Program."
5 return -1;
txtx, txty, txtw, txth;
, "Press ESC to exit program."
, "Press ESC to exit program.");
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.