ENTRY | DOWNLOAD | MANUAL | ONGOING | |
font(), text()font() creates a font from a TrueType file which can then be used by text() to draw text to the screen. Creating the font is computationally much more intensive than the actual drawing of the text to the screen and should preferably not be done in a looping event handler like onDraw(). For more advanced typography the following two classes are suggested over these methods: TagText, SpriteText
font(size, typeface_key)
font(size, typeface_file)
text(string, font, x, y)
Relevant examples: text.py , spritetext.py , tagtext.py , ALL In Contextdef onSetup(self): self.font = font(16, 'arial') def onDrawOrtho(self): text("dispalythis", self.font, 95, 150) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |