I think that the OpenGL frustum is set to the window size in Allegro by default (ie. 800x600 for an 800x600 pixeled window). My setup is not like that, even for 2D games.
It's only a default, you can change it to whatever you like.
Also, when loading a font, the projection matrix is altered upon the first use for caching.
This could be a bug.
However, even after this, the font is enormous when rendered. I think that its rendering function assumes that the frustum is going to be the original size (800x600 or so) rather than what it really is.
No. The font simply has the size it was loaded with. So if you load a 20-pixel font it will have a size of 20 units. If your whole screen is only 1 unit wide it is huge now. Simply scale it before drawing.
Using glScalef doesn't change it.
The OpenGL matrix is ignored by Allegro - you have to use transformations.
The transformations use the opposite order of OpenGL unfortunately so will be quite confusing for someone used to OpenGL. Basically something like this:
Actually, with OpenGL ES 1.0 and OpenGL <= 2.0 there also is a projection matrix applied after the modelview matrix by OpenGL. Only the latter is affected by Allegro's transformations. The projection matrix instead is set to an orthographic projection. So any perspective transform in the modelview matrix will be killed by that projection matrix.
I think we will want a way to also set the projection matrix. For ES 2.0 and GL 3 and 4 it would just be a second matrix provided to the vertex shader. So basically Allegro would have a "current transform" as well as a "current perspective transform".
The latter would just be ignored for software rendering but passed along to shaders as well as fixed-pipeline OpenGL and DirectX (I assume that also can use two matrices in the non-shader case).
Alternatively, maybe we could make Allegro not alter the perspective matrix at all. Then with non-shader GL/DX you could do your own transformations in that matrix. (With shaders you can do what you want anyway.)
But, definitely looks to me like some modification to Allegro is required if we want 3D transformations and/or a way for its drawing functions to work together better with direct GL/DX use.