text.py

"""Draw text into orthographic space.
   FIXME: font sizes bigger than 42
   by stephan)
"""
from slut import *

class Atlantis(World):
    def onSetup(self):
        self.name = "Text"
        self.width = 400
        self.height = 300
        self.font = font(16, 'arial')

    def onDrawOrtho(self):
        text('FULL', self.font, 95, 150)
        glColor4f(1.0, 0.5, 0.5, 1.0)
        text('MOON', self.font, 250, 150)


atlantis = Atlantis()
atlantis.run()
Initiated by Stephan Hechenberger
Thanks to CADRE's 103