From: R.M. L. <u8...@cs...> - 2002-04-16 10:21:07
|
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. |
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 > |
From: Sven G. <sgo...@ja...> - 2002-04-25 04:23:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 17 April 2002 14:09, spong wrote: > hi Mark, > hi all ;-) i guess Jens did not wrote any bullshit .. well, how about just using gl.glScalef(0.5f, 0.5f, 0.5f); with any values within a glPushMatrix/Pop ? otherwise please look at the GLF code .. btw .. yes, textures are used .. anyway we do need a TrueType font rendering in the near future anyway .. cheers, sven - -- health & wealth mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440 ; fax : +49-521-2399442 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8x4R2HdOA30NoFAARAjOTAJ4iLfx/GXtVbIgRxGv2i6gLjk/EIACeMiAa 33giBoEV2XV5b00woN0CZak= =jvoO -----END PGP SIGNATURE----- |
From: spong <sp...@in...> - 2002-04-25 09:02:02
|
Sven Goethel wrote: >anyway we do need a TrueType font rendering >in the near future anyway .. > well, thats true, i'm working on this. but's still enough work ;) Jens |