Font-Size with GLUT

I am trying to bring some outline-fonts into my programm.

But there is a problem with the fontsize. It’s too huge compared to my drawn objects, and watching the api of glut, i can’t find anything which helps me making it smaller.

  void renderStrokeString(GL gl, int font, String string) {
        // Center Our Text On The Screen
        float width = glut.glutStrokeLength(font, string);
        gl.glTranslatef(-width / 2f, 0, 0);
        // Render The Text
        for (int i = 0; i < string.length(); i++) {
            char c = string.charAt(i);
            glut.glutStrokeCharacter(font, c);
            
        }
}

\\This method is called by:

renderStrokeString(gl, GLUT.STROKE_ROMAN, "String you like to insert");


Maybe there is a better solution in jogl than using GLUT? Is there another gl-function which might help me? (I don’t want to make the other object greater)

regards && tia
titoH

glScalef().

Oh yes, thought alread about this. thx. I found another approach on a tutorialwebsite:


Note: GLUT uses lines to draw stroke fonts, therefore we can specify the width of the line with the function glLineWidth. This function takes a float specifying the width as the only parameter.[...]. 

yes, the better solution is called TextRenderer.class