Re: [PyOpenGL-Users] true type fonts
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-05-23 16:21:40
|
https://sourceforge.net/tracker/index.php?func=detail&aid=452946&group_id=5988&atid=355988 is the feature request currently in the hopper. Note that, if you're using PyGame as your hosting context, it has the sdl_ttf module available to do TrueType raster fonts with anti-aliasing. You can find sample code in the Python cookbook here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/115418 Alternately, if you're willing to do platform-specific code, see OpenGLContext.scenegraph.text.wglfont.WGLBitmapFont , which uses wglUseFontBitmapsW to create pixmap fonts similar to those in the PyGame recipe. The WGLOutlineFont class in the same module uses wglUseFontOutlinesW to create polygonal text. See the tracker page for discussion of issues relating to licensing and the like. I've got decent font support on my radar, but at the moment, all the approaches available seem far less than ideal. Enjoy, Mike Champ Hippy wrote: >Hello, > >I'm looking for a way to display "nice" font text on my OpenGL scene >(a simple 2D function plot). So far I used the "glutBitmapCharacter()" >function but I'm not satisfied with it for I at least need greek letters. > >I know the existence of GLTT (http://gltt.sourceforge.net/index.html) >and OGLFT (http://oglft.sourceforge.net) and I would like to wrap them >(if possible) using swig. Unfortunately, my comprehension of swig is >too low for that task : I do not how to cope with nested class in GLTT >(class FTGlyphVectorizer) and OGLFT start with a namespace definition, >both c++ features that are difficult to handle with swig. > >So my questions are : >- is it possible to wrap these libraries ? >- did someone managed to wrap these or equivalent libraries ? >- is there another solution to my problem ? > >Thanks, > >Bernard > > >------------------------------------------------------- >This SF.net email is sponsored by: ObjectStore. >If flattening out C++ or Java code to make your application fit in a >relational database is painful, don't do it! Check out ObjectStore. >Now part of Progress Software. http://www.objectstore.net/sourceforge >_______________________________________________ >PyOpenGL Homepage >http://pyopengl.sourceforge.net >_______________________________________________ >PyOpenGL-Users mailing list >PyO...@li... >https://lists.sourceforge.net/lists/listinfo/pyopengl-users > > > -- _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |