29 #ifndef __FONTSTYLE_H__
30 #define __FONTSTYLE_H__
168 Inst< MFString > _family = 0,
169 Inst< SFBool > _horizontal = 0,
170 Inst< MFString > _justify = 0,
171 Inst< SFString > _language = 0,
172 Inst< SFBool > _leftToRight = 0,
173 Inst< SFFloat > _size = 0,
174 Inst< SFFloat > _spacing = 0,
175 Inst< SFString > _style = 0,
176 Inst< SFBool > _topToBottom = 0,
177 Inst< SFString > _renderType = 0,
178 Inst< SFInt32 > _faceSize = 0);
179 #if defined( HAVE_FREETYPE ) && defined( HAVE_FTGL )
183 virtual void buildFonts();
188 return topToBottom->getValue();
194 return leftToRight->getValue();
200 return spacing->getValue();
205 if( horizontal->getValue() )
212 virtual void renderChar(
unsigned char c );
215 virtual void renderHorizontalLine(
const std::string& c );
227 virtual Vec3f charDimensions(
unsigned char c );
230 virtual Justification getMajorJustification();
233 virtual Justification getMinorJustification();
344 #if defined( HAVE_FREETYPE ) && defined( HAVE_FTGL )
Contains the MFString field class.
Contains the SFBool field class.
Contains the SFFloat field class.
Contains the SFInt32 field class.
Contains the SFString field class.
Header file for X3DFontStyleNode, X3D scene-graph node.
Thrown when the strings in the justify field are invalid values.
Definition: FontStyle.h:162
Thrown when the strings in the renderType field are invalid values.
Definition: FontStyle.h:164
Thrown when the string in the style field is an invalid value.
Definition: FontStyle.h:160
The FontStyle node defines the size, family, and style used for Text nodes, as well as the direction ...
Definition: FontStyle.h:157
H3DUniquePtr< SFFloat > size
The size field specifies the nominal height, in the local coordinate system of the Text node,...
Definition: FontStyle.h:290
H3DUniquePtr< SFString > renderType
The renderType field is H3D API specific and specifies which way the font will be rendered.
Definition: FontStyle.h:331
H3DUniquePtr< SFString > language
The language field specifies the context of the language for the text string in the form of a languag...
Definition: FontStyle.h:270
H3DUniquePtr< SFBool > topToBottom
The topToBottom field indicate direction of text advance in the major (characters within a single str...
Definition: FontStyle.h:321
FTFont * font
FTGL container class for all glyphs in the current font, used to measure bounding boxes,...
Definition: FontStyle.h:347
H3DUniquePtr< SFBool > horizontal
The horizontal field indicates whether the text advances horizontally in its major direction (horizon...
Definition: FontStyle.h:253
virtual bool isTopToBottom()
Returns true if the text should be rendered from top to bottom, false otherwise.
Definition: FontStyle.h:187
H3DUniquePtr< SFString > style
The style field specifies a case-sensitive SFString value that may be "PLAIN" (the default) for defau...
Definition: FontStyle.h:310
H3DUniquePtr< SFBool > leftToRight
The leftToRight field indicate direction of text advance in the major (characters within a single str...
Definition: FontStyle.h:281
virtual bool isLeftToRight()
Returns true if the text should be rendered from left to right, false otherwise.
Definition: FontStyle.h:193
H3DUniquePtr< MFString > family
The family field contains a case-sensitive MFString value that specifies a sequence of font family na...
Definition: FontStyle.h:244
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: FontStyle.h:342
H3DUniquePtr< SFInt32 > faceSize
The faceSize field specifies the size of character faces in points, where each point is 1/72 of an in...
Definition: FontStyle.h:339
virtual H3DFloat getSpacing()
Returns the spacing between lines of text.
Definition: FontStyle.h:199
H3DUniquePtr< SFFloat > spacing
The spacing field determines the line spacing between adjacent lines of text.
Definition: FontStyle.h:299
virtual Alignment getAlignment()
Gets the alignment of the text.
Definition: FontStyle.h:204
H3DUniquePtr< MFString > justify
The justify field determines alignment of the above text layout relative to the origin of the object ...
Definition: FontStyle.h:263
This abstract node type is the base node type for all FontStyle nodes.
Definition: X3DFontStyleNode.h:41
Alignment
Enumeration of the alignments allowed for text.
Definition: X3DFontStyleNode.h:45
H3D_VALUE_EXCEPTION(string, InvalidType)
An exception thrown when a field is of the wrong type when it is checked.
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194