Package com.openinventor.inventor.nodes
Class SoFontStyle
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoFontStyle extends SoFont
Defines font family and style for text. This node defines the current font family and style for all subsequent text shapes in the scene graph.Note: The "name" field inherited from
SoFont
is ignored bySoFontStyle
. This node maps font family and style to a specific predefined font, according to the OS in use. Use thegetFontName()
method to get the actual font name that will be used.On Windows, the font families are mapped as follows:
SERIF Times New Roman SANS Arial TYPEWRITER Courier New File format/default:
FontStyle {
name "defaultFont" size 10 family SERIF style NONE renderStyle POLYGON Action behavior:
SoGLRenderAction
,SoCallbackAction
,SoGetBoundingBoxAction
,SoRayPickAction
Sets the font family and style in the current traversal state. Sets:SoFontNameElement
,SoFontSizeElement
,- See Also:
SoAsciiText
,SoFont
,SoText2
,SoText3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoFontStyle.Families
Font style family.static class
SoFontStyle.Styles
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoFont
SoFont.RenderStyles
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<SoFontStyle.Families>
family
Specifies the family of font to use (which determines the font name according to table above).SoSFBitMask<SoFontStyle.Styles>
style
Specifies style of the chosen font.-
Fields inherited from class com.openinventor.inventor.nodes.SoFont
name, renderStyle, size
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoFontStyle()
Creates a font style node with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFontName()
Returns the font name used by this node based on the settings of family and style.-
Methods inherited from class com.openinventor.inventor.nodes.SoFont
addFontPaths, clearFontNameCache, enableJapaneseSF, enableJapaneseSF, getCurrNumFontCaches, getFontPaths, getNumFontCaches, isAvailableFont, isJapaneseSFEnabled, setFontPaths, setNumFontCaches
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
family
public final SoSFEnum<SoFontStyle.Families> family
Specifies the family of font to use (which determines the font name according to table above). . Default is SERIF.
-
style
public final SoSFBitMask<SoFontStyle.Styles> style
Specifies style of the chosen font. . Default is NONE.
-
-