KX_FontObject
Base class: KX_GameObject
A Font object.
# Display a message about the exit key using a Font object.import Range
co = Range.logic.getCurrentController()font = co.owner
exit_key = Range.events.EventToString(Range.logic.getExitKey())
if exit_key.endswith("KEY"): exit_key = exit_key[:-3]
font.text = "Press key '%s' to quit the game." % exit_keyThe text displayed by this Font object.
Type: string
resolution
Section titled “resolution”The resolution of the font police.
Type: float (0.1 to 50.0)
The size (scale factor) of the font object, scaled from font object origin (affects text resolution).
Type: float (0.0001 to 40.0)
dimensions
Section titled “dimensions”The size (width and height) of the current text in Blender Units.
Type: mathutils.Vector
Not in the Range documentation
Section titled “Not in the Range documentation”These items exist in the engine but were not in the Range documentation. The ones marked new in Anastacio were added by Anastacio Engine.
shadowColor
Section titled “shadowColor”attribute
Text shadow color [r, g, b, a].
shadowOffset
Section titled “shadowOffset”attribute
Text shadow offset [x, y].
useShadows
Section titled “useShadows”attribute
Turns on the text shadow.
