Re: [PyOpenGL-Users] font options
Brought to you by:
mcfletch
From: Jonathan H. <ta...@ta...> - 2010-12-01 19:48:55
|
Pyglet does font rendering. I don't know whether Pyglet plays nice with Tkinter / Togl applications. Maybe you can give pyglet an OpenGL context to use? If it *does* work, then you could use any installed font, or font files you provide. See classes Label (plain text) and HTMLLabel (formatted with layout): http://www.pyglet.org/doc/api/pyglet.text-module.html I once borrowed someone else's code (origins lost in the mists of time, sorry!) which uses pyglet font rendering to render text to a texture, rather than to the screen: http://code.google.com/p/brokenspell/source/browse/trunk/sinisterducks/label2texture.py Jonathan On 01/12/2010 18:46, Philip Winston wrote: > I have a Tkinter/Togl/PyOpenGL app and am interested in my options for > drawing 2d text in the OpenGL window. Text for heads-up text or > labels of entities, maybe tooltip-like prompts. I don't care about > supporting arbitrarily fonts, as long as I have one good readable font. > > Is it possible to use glutBitmapString even though I'm not using GLUT? > Is this a reasonable approach, any tips for speed? > > I'd like to keep my dependencies minimal. I saw PyFTGL but wondered if > it might be overkill for my needs, and it requires FTGL and FreeType. > > -Philip > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users -- Jonathan Hartley Made of meat. http://tartley.com ta...@ta... +44 7737 062 225 twitter/skype: tartley |