"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

GeeXLab

Laboratory for Real Time 3D Programming (prototyping and demos)
OpenGL, Lua, Python, GLSL,
PhysX and more...

Reference Guide
XML Nodes



Back to homepage
Back to Developer's Guide Index

<font> XML Node


XML Node Summary
<font
  name=""
  render="TRUE"
  ttf_name="Arial"
  size="14"
  >
  <text_2d
    >
    <color
      r="1.0"
      g="1.0"
      b="1.0"
      >
    </color>
    <position
      x="0"
      y="0"
      >
    </position>
    <text
      text=""
      >
    </text>
  </text_2d>
</font>


<font>

Description
The font node makes it possible to display information in textual form. It uses Windows TTF fonts (True Type Fonts). The texts can be displayed in 2d or 3d coordinates (useful to perform an axis graduation for example).

font element has 4 attributes and 1 sub-element(s)

Attributes
  • name [STRING]: Name of font node
  • render [BOOLEAN]: Enables or disables the rendering of the font. - Default value = TRUE
  • ttf_name [STRING]: Name of the TrueType used font: Arial, Verdana, Trebuchet MS, etc. - Default value = Arial
  • size [INTEGER]: Specifies the font size - Default value = 14

Code sample :

<font name="myFont" ttf_name="Arial" size="14" >
<text_2d>
<color r="1.0" g="1.0" b="0.0" />
<position x="5" y="20" />
<text text="Hello from GeeXLab!" />
</text_2d>
</font>

<text_2d>

Description
Allows to render texts in 2d screen coordinates.

text_2d element has 0 attributes and 3 sub-element(s)

<color>

Description
Specifies the color of the text.

color element has 3 attributes and 0 sub-element(s)

Attributes
  • r [REAL]: red component of the color - Default value = 1.0
  • g [REAL]: green component of the color - Default value = 1.0
  • b [REAL]: blue component of the color - Default value = 1.0

<position>

Description
Specifies the position of the text. The position x=0 and y=0 is the left-top corner of the screen.

position element has 2 attributes and 0 sub-element(s)

Attributes
  • x [INTEGER]: X coordinate of the beginning of the text - Default value = 0
  • y [INTEGER]: Y coordinate of the beginning of the text - Default value = 0

<text>

Description
Specifies the text.

text element has 1 attributes and 0 sub-element(s)

Attributes
  • text [STRING]: text content
Random Projects

PyOpenGL_LAB
PyOpenGL_LAB

Dream Vision Effect
Dream Vision Effect

Dream Vision Effect
Dream Vision Effect


Random Code Samples

Draw Line
Draw Line

Collada Format Loading
Collada Format Loading

Mesh Instancing - Spirale
Mesh Instancing - Spirale



(C)2009-2010 Geeks3D.com