Package com.openinventor.inventor.nodes
Class SoFontStyle
- All Implemented Interfaces:
SafeDisposable
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 by SoFontStyle
. This node maps font family and style to a specific predefined font, according to the OS in use. Use the getFontName()
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Font style family.static enum
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
FieldsModifier and TypeFieldDescriptionfinal SoSFEnum
<SoFontStyle.Families> Specifies the family of font to use (which determines the font name according to table above).final SoSFBitMask
<SoFontStyle.Styles> 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 -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 Details
-
family
Specifies the family of font to use (which determines the font name according to table above). . Default is SERIF. -
style
Specifies style of the chosen font. . Default is NONE.
-
-
Constructor Details
-
SoFontStyle
public SoFontStyle()Creates a font style node with default settings.
-
-
Method Details
-
getFontName
Returns the font name used by this node based on the settings of family and style.
-