[ Back to Geeks3D.com ]
 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
<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>
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)
- 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
:
<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>
Allows to render texts in 2d screen coordinates.
text_2d element has 0 attributes and 3 sub-element(s)
<color>
Specifies the color of the text.
color element has 3 attributes and 0 sub-element(s)
- 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>
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)
- 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>
Specifies the text.
text element has 1 attributes and 0 sub-element(s)
- text [STRING]: text content
|