def setupFontProviders(self): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ fontprovider.setTTFRegistry(self.getTTFFiles(), )
def setupFontProviders(self): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ from OpenGLContext.scenegraph.text import fontprovider try: from OpenGLContext.scenegraph.text import toolsfont registry = self.getTTFFiles() except ImportError as err: log.warn( """Unable to import TTFQuery/FontTools-based TTF-file registry, no TTF font support!""" ) else: fontprovider.setTTFRegistry(registry, ) try: from OpenGLContext.scenegraph.text import pygamefont except (ImportError, NotImplementedError): log.warn( """Unable to import PyGame TTF-font renderer, no PyGame anti-aliased font support!""" ) try: from OpenGLContext.scenegraph.text import glutfont except ImportError: log.error( """Unable to import GLUT-based font renderer, no GLUT bitmap font support (this is unexpected)!""" )
def setupFontProviders(self): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ from OpenGLContext.scenegraph.text import fontprovider try: from OpenGLContext.scenegraph.text import toolsfont registry = self.getTTFFiles() except ImportError as err: log.warn( """Unable to import fonttools-based TTF-file registry, no TTF font support!""" ) else: fontprovider.setTTFRegistry(registry, ) self.families = registry.DEFAULT_FAMILY_SETS.keys() self.families.sort() self.family = self.families[0] try: from OpenGLContext.scenegraph.text import pygamefont except ImportError: log.warn( """Unable to import PyGame TTF-font renderer, no PyGame anti-aliased font support!""" ) try: from OpenGLContext.scenegraph.text import glutfont except ImportError: log.warn( """Unable to import GLUT-based TTF-file registry, no GLUT bitmap font support!""" )
def setupFontProviders( self ): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ fontprovider.setTTFRegistry( self.getTTFFiles(), )
def setupFontProviders(self): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ from OpenGLContext.scenegraph.text import fontprovider try: from OpenGLContext.scenegraph.text import toolsfont registry = self.getTTFFiles() except ImportError, err: log.warn( """Unable to import TTFQuery/FontTools-based TTF-file registry, no TTF font support!""" ) else: fontprovider.setTTFRegistry(registry, ) try: from OpenGLContext.scenegraph.text import pygamefont except (ImportError, NotImplementedError): log.warn( """Unable to import PyGame TTF-font renderer, no PyGame anti-aliased font support!""" ) try: from OpenGLContext.scenegraph.text import glutfont except ImportError: log.error( """Unable to import GLUT-based font renderer, no GLUT bitmap font support (this is unexpected)!""" ) def OnInit(self): """Initialise the VRMLContext keyboard shortcuts"""
sg = None def setupFontProviders( self ): """Load font providers for the context See the OpenGLContext.scenegraph.text package for the available font providers. """ from OpenGLContext.scenegraph.text import fontprovider try: from OpenGLContext.scenegraph.text import toolsfont registry = self.getTTFFiles() except ImportError, err: log.warn( """Unable to import TTFQuery/FontTools-based TTF-file registry, no TTF font support!""" ) else: fontprovider.setTTFRegistry( registry, ) try: from OpenGLContext.scenegraph.text import pygamefont except (ImportError,NotImplementedError): log.warn( """Unable to import PyGame TTF-font renderer, no PyGame anti-aliased font support!""" ) try: from OpenGLContext.scenegraph.text import glutfont except ImportError: log.error( """Unable to import GLUT-based font renderer, no GLUT bitmap font support (this is unexpected)!""" ) def OnInit( self ): """Initialise the VRMLContext keyboard shortcuts""" def load( self, filename ): """Load given url, replacing current scenegraph"""