Text on the surface of 3D-packages doesn't work


I am actually working on a software for container-packing-optimization.
So I have several packages that are stacked in a special position to each other inside a container (“package-heap”). My software calculates the best position for each package in the heap, so that the complete heap (container) has as low volume as possible.
The result that was calculated by the algorithm, must be graphically visualized in 3D.

I have already successfully shown the package-heap-result (result of the position-calculation) by OpenGL on the screen (with Visual C++ 6.0).
Look for Snapshot-Example please at http://www.ls-logistic-software.com/openGL/SnapShot.jpg

Now additionally, on every package out of the heap, the measures or some other text should be written on all of his six outside-surfaces.
For example, if I have a package of 40 x 50 x 60cm, then on the outside-surfaces the Text (40 / 50), (40 / 60), (50 / 60) should be written.

With Nehes example of Lesson 13, I could generate “normal Text” that is always in the same position, to sign the global-measure-numbers, as it can be seen at the Snapshot or in my example code here (the “measure-scale-numbers”):

But the problem is, that I need beside this measure-scales, also text on the surfaces of each package, exactly always in the plane / level of the package surfaces.
As you can see, you can rotate the packages by clicking and moving them with the mouse in my code example.
With Lesson 13 (NeHe) it is not possible to bring text in certain planes, but only in one static “non-rotated-front-position”.
Furthermore, a glRotated or glTranslated-command directly before or directly after the glRasterPos3d-command has here at my example-code no effect, as I could see.

So what is wrong with my code ?

Could somebody revise the code to solve the problem please ?

Put your text in a texture, and put the texture on your surfaces. As you posted in the advanced forum I assume you know how to implement this trivially. Else search for FTGL.