Open Inventor Reference
SoFont Class Reference

Node that defines font type and size for text. More...

#include <Inventor/nodes/SoFont.h>

Inheritance diagram for SoFont:
SoNode SoFieldContainer SoBase SoFontStyle

List of all members.

Public Member Functions

 SoFont ()
 Creates a font node with default settings.
virtual void doAction (SoAction *action)
 This method performs the "typical" operation of a node for any action.
virtual void GLRender (SoGLRenderAction *action)
 These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing.
virtual void callback (SoCallbackAction *action)
virtual void pick (SoPickAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFName name
 This field defines the font name as a PostScript name.
SoSFFloat size
 This field defines the font size.

Protected Member Functions

virtual ~SoFont ()

Detailed Description

This node defines the current font type and point size for all subsequent text shapes in the scene graph. Fonts are specified with PostScript names, except for the default font. The default font is called "defaultFont" and is the standard SGI graphics font for 2D text. "Utopia" is the standard Inventor font for 3D text.

File Format/Default
Font {
  name "defaultFont"
  size 10
}
Action Behavior
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
Sets the font name and size in the current traversal state.
See Also
SoText2, SoText3

Definition at line 94 of file SoFont.h.


Constructor & Destructor Documentation

SoFont::SoFont ( )
virtual SoFont::~SoFont ( ) [protected, virtual]

Member Function Documentation

virtual void SoFont::callback ( SoCallbackAction action) [virtual]

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

virtual void SoFont::doAction ( SoAction action) [virtual]

The default implementation does nothing.

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

virtual void SoFont::getBoundingBox ( SoGetBoundingBoxAction action) [virtual]

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

virtual void SoFont::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

static void SoFont::initClass ( ) [static]

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

virtual void SoFont::pick ( SoPickAction action) [virtual]

Reimplemented from SoNode.

Reimplemented in SoFontStyle.


Member Data Documentation

For example, Times Roman would be specified as Times-Roman. Multiple fonts can be specified by separating the font names with semicolons. When multiple fonts are specified, the first font in the list that contains a given character is used to render that character.

Definition at line 107 of file SoFont.h.

The value is in points for 2D text and is in the current units for 3D text.

Definition at line 111 of file SoFont.h.


The documentation for this class was generated from the following file: