From: spong <sp...@in...> - 2002-04-17 12:10:04
|
hi Mark, two kinds of fonts are included in GL4Java ( and also in the glut-libraries ): bitmap-fonts and stroke-fonts. Bitmap-fonts are only avaiable with the size they are created. Actually and at my knowledge, the fonts you use are textures --> scale the underlying faces and attach them the also scaled font-textures. But if you use the methods included in the GL4Java-packages ( gl4java.utils.glf & gl4java.util.glut.font ) you can't do this. In this case you should ( if you want to have scalable fonts/characters ) write your own methods to create the faces representing the text. Another way: create your own set of characters ( look at classes: gl4java.util.font.BitmapCharRec & gl4java.util.font.BitmapFontRec ).If you want to use predefined fonts the only way is to use the glut-method glutStokeCharacter ( gl4java: glutStrokeString ). The geometric objects created by this methods are scalable. But only two fonts are avaiable: GLUT_STROKE_ROMAN and GLUT_STROKE_MONO_ROMAN. on the other hand: i don't know what actually glfDraw3DSolidStringF(...) create ;) maybe 3D-solids?? then you can simply use glScaleMatrix to scale the solids! hope, i don't wrote bullshit. Jens ( and sorry for my bad english ) R.M. Logan wrote: >I've looked at several pages on the web and the glf demo on the gl4java >site, but does anyone know how it is possible to change the actual size >of the font? Is it actually possible? > >When i'm drawing my text i currently have: > > gl.glPushMatrix(); > gl.glColor3f(0.0f,0.0f,0.0f); > glf.glfDraw3DSolidStringF(fTimesNew1,"Event"); > gl.glTranslatef(0.0f,-1.4f,0.0f); > glf.glfDraw3DSolidStringF(fTimesNew1,"Age"); > gl.glTranslatef(0.0f,-1.4f,0.0f); > glf.glfDraw3DSolidStringF(fTimesNew1,"Date"); > gl.glTranslatef(0.0f,-1.4f,0.0f); > glf.glfDraw3DSolidStringF(fTimesNew1,"Parish"); > gl.glTranslatef(0.0f,-1.4f,0.0f); > > gl.glPopMatrix(); > >Is it possible to set the font, any ideas, currently it displays too >big. > >(Btw this is the last hurdle in my project). > > Thanks again, > Mark. > >_______________________________________________ >gl4java-usergroup mailing list >gl4...@li... >https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |