I'm working on a small component for a game that essentially wraps the provided String so that it fits within the width of the provided rectangle. The rectangle is provided by the Slick2D library as well. I've assumed thus far that the width of that rectangle is in OpenGL units, but the distinction has been irrelevant in any way I've used Slick2D geometry so far.
Now, I'm using the UnicodeFont class and I'm not sure what units the return value of the getWidth method of that class is in. UnicodeFont.getWidth() returns an int value, so my initial inclination was to think it returned the value in pixels.
The Rectangle class supplied by Slick2D however, returns a float value. This leads me to believe that it is measuring the width using OpenGL coordinates, but I'm not sure.
So perhaps the community knows. Do the return values of both the Rectangle.getWidth() and the UnicodeFont.getWidth() methods use the same system of measurement?