Click or drag to resize
SoVRMLFontStyle Class

Note: This API is now obsolete.

Specifies font size, family, style, etc.

Inheritance Hierarchy

Namespace: OIV.Inventor.VRMLnodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[ObsoleteAttribute("See documentation for more details")]
public class SoVRMLFontStyle : SoVRMLNode

The SoVRMLFontStyle type exposes the following members.

Constructors
  NameDescription
Public methodSoVRMLFontStyle

Constructor.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodCallback
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetFontName

Return the font name used by this node based on the settings of family and style.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetMatrix
(Inherited from SoNode.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetPrimitiveCount
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoNode.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsBoundingBoxIgnoring

This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored.

(Inherited from SoNode.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodPick
Public methodRayPick
(Inherited from SoNode.)
Public methodSearch
(Inherited from SoNode.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodWrite
(Inherited from SoNode.)
Top
Properties
  NameDescription
Public propertyfamily

Specifies the family of font to use.

Public propertyhorizontal

Characters advance in the X direction if true.

Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyjustify

Indicates placement and alignment of strings.

Public propertylanguage

(Note: Not implemented) Language-specific rendering techniques used for non-English text.

Public propertyleftToRight

Characters advance in the positive X direction if true.

Public propertymetadata

Specifies the metadata node.

(Inherited from SoVRMLNode.)
Public propertysize

Specifies the height of glyphs rendered and helps determine the spacing of adjacent lines.

Public propertyspacing

Specifies the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height.

Public propertystyle

Defines style modification to the chosen font (bold, italic, etc.).

Public propertytopToBottom

(Note: Not implemented) Default value of false is used.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Remarks

The SoVRMLFontStyle node defines the size, font family, and style of text's font, as well as the direction of the text strings and any specific language rendering techniques that must be used for non-English text. See SoVRMLText node for application of SoVRMLFontStyle.

<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.

The size field specifies the height (in object space units) of glyphs rendered and determines the spacing of adjacent lines of text. All subsequent strings advance in Y by -(size * spacing). Only horizontal text is supported in this release.

Font attributes are defined with the family and style fields.

The family field specifies a case-sensitive MFString value that may be "SERIF" (the default) for a serif font such as Times Roman; "SANS" for a sans-serif font such as Helvetica; or "TYPEWRITER" for a fixed-pitch font such as Courier. A family value of empty quotes, "", is identical to "SERIF".

The style field specifies a case-sensitive SFString value that may be "PLAIN" (the default) for default plain type; "BOLD" for boldface type; "ITALIC" for italic type; or "BOLDITALIC" for bold and italic type. A style value of empty quotes, "", is identical to "PLAIN".

The horizontal, leftToRight, and topToBottom fields indicate the direction of the text. NOTE: Only horizontal text drawn leftToRight is supported in this release. Characters on each line of text advance in the positive X direction according to their natural advance width. Then each line of characters is advanced in the negative Y direction.

The justify field determines alignment of the above text layout relative to the origin of the object coordinate system. It is an MFString which can contain 2 values. The first value specifies alignment along the major axis and the second value specifies alignment along the minor axis. NOTE: Only the major axis alignment is supported in this release. An empty justify value is equivalent to the default values.

The major alignment is along the X axis. The possible values for each enumerant of the justify field are "BEGIN", "MIDDLE", and "END". Each line of text is positioned individually according to the alignment enumerant.

VRML97 SPECIFICATION

This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.

This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org.

The SoVRMLFontStyle node defines the size, font family, and style of text's font, as well as the direction of the text strings and any specific language rendering techniques that must be used for non-English text. See SoVRMLText node for application of SoVRMLFontStyle.

The size field specifies the height (in object space units) of glyphs rendered and determines the spacing of adjacent lines of text. All subsequent strings advance in either X or Y by -(size * spacing).

Font Family and Style

Font attributes are defined with the family and style fields. It is up to the browser to assign specific fonts to the various attribute combinations.

The family field specifies a case-sensitve MFString value that may be "SERIF" (the default) for a serif font such as Times Roman; "SANS" for a sans-serif font such as Helvetica; or "TYPEWRITER" for a fixed-pitch font such as Courier. A family value of empty quotes, "", is identical to "SERIF".

The style field specifies a case-sensitive SFString value that may be "PLAIN" (the default) for default plain type; "BOLD" for boldface type; "ITALIC" for italic type; or "BOLDITALIC" for bold and italic type. A style value of empty quotes, "", is identical to "PLAIN".

Direction, Justification and Spacing

The horizontal, leftToRight, and topToBottom fields indicate the direction of the text. The horizontal field indicates whether the text advances horizontally in its major direction (horizontal = true, the default) or vertically in its major direction (horizontal = false). The leftToRight and topToBottom fields indicate direction of text advance in the major (characters within a single string) and minor (successive strings) axes of layout. Which field is used for the major direction and which is used for the minor direction is determined by the horizontal field.

For horizontal text (horizontal = true), characters on each line of text advance in the positive X direction if leftToRight is true or in the negative X direction if leftToRight is false. Characters are advanced according to their natural advance width. Then each line of characters is advanced in the negative Y direction if topToBottom is true or in the positive Y direction if topToBottom is false. Lines are advanced by the amount of size * spacing.

For vertical text (horizontal = false), characters on each line of text advance in the negative Y direction if topToBottom is true or in the positive Y direction if topToBottom is false. Characters are advanced according to their natural advance height. Then each line of characters is advanced in the positive X direction if leftToRight is true or in the negative X direction if leftToRight is false. Lines are advanced by the amount of size * spacing.

The justify field determines alignment of the above text layout relative to the origin of the object coordinate system. It is an MFString which can contain 2 values. The first value specifies alignment along the major axis and the second value specifies alignment along the minor axis, as determined by the horizontal field. A justify value of "" is equivalent to the default values. If the second string, minor alignment, is not specified then it defaults to the value "FIRST". Thus, justify values of "", "BEGIN" and "BEGIN FIRST" are equivalent.

The major alignment is along the X axis when horizontal is true and along the Y axis when horizontal is false. The minor alignment is along the Y axis when horizontal is true and along the X axis when horizontal is false. The possible values for each enumerant of the justify field are "FIRST", "BEGIN", "MIDDLE", and "END". For major alignment, each line of text is positioned individually according to the major alignment enumerant. For minor alignment, the block of text representing all lines together is positioned according to the minor alignment enumerant. The following tables describe the behavior in terms of which portion of the text is at the origin:

Major Alignment, horizontal = true:

<TABLE border=0 cellspacing=0 cellpadding=5>
  <TR><TD valign=_top> <B> Enumerant </B>   <TD valign=_top> #leftToRight <B>  = true </B>   <TD valign=_top> #leftToRight <B>  = false </B>
  <TR><TD valign=_top> FIRST             <TD valign=_top> Left edge of each line            <TD valign=_top> Right edge of each line
  <TR><TD valign=_top> BEGIN             <TD valign=_top> Left edge of each line            <TD valign=_top> Right edge of each line
  <TR><TD valign=_top> MIDDLE            <TD valign=_top> Centered about X-axis             <TD valign=_top> Centered about X-axis
  <TR><TD valign=_top> END               <TD valign=_top> Right edge of each line           <TD valign=_top> Left edge of each line
</TABLE> 

Major Alignment, horizontal = false:

<TABLE border=0 cellspacing=0 cellpadding=5>
  <TR><TD valign=_top> <B> Enumerant </B>   <TD valign=_top> #topToBottom <B>  = true </B>   <TD valign=_top> #topToBottom <B>  = false </B>
  <TR><TD valign=_top> FIRST             <TD valign=_top> Top edge of each line             <TD valign=_top> Bottom edge of each line
  <TR><TD valign=_top> BEGIN             <TD valign=_top> Top edge of each line             <TD valign=_top> Bottom edge of each line
  <TR><TD valign=_top> MIDDLE            <TD valign=_top> Centered about Y-axis             <TD valign=_top> Center about Y-axis
  <TR><TD valign=_top> END               <TD valign=_top> Bottom edge of each line          <TD valign=_top> Top edge of each line
</TABLE> 

Minor Alignment, horizontal = true:

<TABLE border=0 cellspacing=0 cellpadding=5>
  <TR><TD valign=_top> <B> Enumerant </B>   <TD valign=_top> #topToBottom <B>  = true </B>   <TD valign=_top> #topToBottom <B>  = false </B>
  <TR><TD valign=_top> FIRST             <TD valign=_top> Baseline of first line            <TD valign=_top> Baseline of first line
  <TR><TD valign=_top> BEGIN             <TD valign=_top> Top edge of first line            <TD valign=_top> Bottom edge of first line
  <TR><TD valign=_top> MIDDLE            <TD valign=_top> Centered about Y-axis             <TD valign=_top> Centered about Y-axis
  <TR><TD valign=_top> END               <TD valign=_top> Bottom edge of last line          <TD valign=_top> Top edge of last line
</TABLE> 

Minor Alignment, horizontal = false:

<TABLE border=0 cellspacing=0 cellpadding=5>
  <TR><TD valign=_top> <B> Enumerant </B>   <TD valign=_top> #leftToRight <B>  = true </B>   <TD valign=_top> #leftToRight <B>  = false </B>
  <TR><TD valign=_top> FIRST             <TD valign=_top> Left edge of first line           <TD valign=_top> Right edge of first line
  <TR><TD valign=_top> BEGIN             <TD valign=_top> Left edge of first line           <TD valign=_top> Right edge of first line
  <TR><TD valign=_top> MIDDLE            <TD valign=_top> Centered about X-axis             <TD valign=_top> Centered about X-axis
  <TR><TD valign=_top> END               <TD valign=_top> Right edge of last line           <TD valign=_top> Left edge of last line
</TABLE> 

The default minor alignment is "FIRST". This is a special case of minor alignment when horizontal is true. Text starts at the baseline at the Y-axis. In all other cases, :"FIRST" is identical to "BEGIN". In the following tables, each small cross indicates where the X and Y axes should be in relation to the text:

horizontal = true:

horizontal = false:

The language field specifies the context of the language for the text string. Due to the multilingual nature of the ISO 10646-1:1993, the language field is needed to provide a proper language attribute of the text string. The format is based on the POSIX locale specification as well as the RFC 1766: language[_territory]. The values for the language tag is based on the ISO 639, i.e., zh for Chinese, jp for Japanese, sc for Swedish. The territory tag is based on the ISO 3166 country code, i.e., TW is for Taiwan and CN for China for the "zh" Chinese language tag. If the language field is set to empty "", then local language bindings are used.

Please refer to these sites for more details: http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_639.htmlhttp://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html

FILE FORMAT/DEFAULT

VRMLFontStyle {
family "SERIF"
horizontal true
justify "BEGIN"
language ""
leftToRight true
size 1.0
spacing 1.0
style "PLAIN"
topToBottom true
metadata NULL
}

ACTION BEHAVIOR

SoGLRenderAction, SoRayPickAction, SoGetBoundingBoxAction, SoCallbackAction Sets: SoFontNameElement, SoFontSizeElement,

eventIn

SoSFNodeset_metadata

eventOut

SoSFNodemetadata_changed
Obsoletesince Open Inventor 9500 The VRML API is no longer supported. See section http://oivdoc95.vsg3d.com/content/compatibility-notes-4#Deprecation of the Reference Manual.

See Also