OpenGL VRML Shockwave 3D
Home Tutorials Books Applications Tools Docs Models Textures

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

FontStyle Node


This node is used inside the Text node to specify the display properties of the strings. The following fields are present:
  • family specifies the font family. Values for this field are: "SERIF", "SANS", "TYPEWRITER".
  • style specifies the font style. Values for this field are: "PLAIN", "BOLD", "ITALIC", "BOLDITALIC".
  • horizontal is a boolean field which specifies if the text is to be displayed horizontally.
  • leftToRight is a boolean field which specifies if the text is displayed left to right or right to left (Arabic way)
  • topToBottom is a boolean field which specifies if the text is displayed top to bottom or bottom to top (Chinese way).
  • justify specifies justification both along the major and the minor direction. If horizontal is TRUE then the major direction is horizontal and the minor direction is vertical, otherwise the major direction is vertical and the minor direction is horizontal. If only one value is specified then it refers to the major direction. The default value for the minor direction is "FIRST". There are four possible values for each justification: "FIRST", "BEGIN" (left justified), "MIDDLE" (centered), and "END" (right justified). "BEGIN" and "FIRST" are equivalent except for the minor direction when horizontal is TRUE (see note bellow).
  • language specifies the character set. "en" for English,"en_US" for US english, "zh" for Chinese, etc...
  • size specifies character height in VRML units.
  • spacing specifies the spacing between lines.


  • Syntax:
    FontStyle {
    family "SERIF"
    horizontal TRUE
    justify "BEGIN"
    language ""
    leftToRight TRUE
    size 1.0
    spacing 1.0
    topToBottom TRUE
    }


    Important: VRML is case-sensitive, be careful.

    Note: When horizontal is TRUE the following difference occurs in the minor direction justification between using "FIRST" and "BEGIN":

    "FIRST": The baseline of the first line is placed at the X axis.

    "BEGIN": If topToBottom is TRUE the top edge of the first line is the placed at the X axis, else the bottom edge of the first line is placed at the X axis.



    Site designed and maintained by António Ramires Fernandes
    Your comments, suggestions and references to further material are welcome!

    Lighthouse 3D privacy statement