SOFONT(3iv)
π SoFont β NAME π
SoFont β the node that defines the font type and size for text, and honestly? it's giving main character energy for every text shape that comes after it. π
𧬠INHERITS FROM π§¬
SoBase > SoFieldContainer > SoNode > SoFont
like yes, she comes from a whole lineage of icons. generational wealth of nodes fr fr π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoFont.h>
Fields from class SoFont:
SoSFName name
SoSFFloat size
Methods from class SoFont:
SoFont()
static SoType getClassTypeId()
Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
look at all those inherited methods, she's literally carrying her whole family tree on her back and doing it flawlessly π«Ά
πΈ DESCRIPTION πΈ
okay so listen. π This node sets the current font type and point size for all subsequent text shapes in the scene graph. Like, once you drop a SoFont, everything downstream is reading from her notes. periodt.
Fonts are specified with PostScript names β with one iconic exception: the default font. The default font is called "defaultFont" and is the standard SGI graphics font for 2D text. And "Utopia"? That's the standard Inventor font for 3D text. iykyk π¦
π FIELDS π
SoSFNamenameβ this field is the font name, as a PostScript name. So like, Times Roman? You'd write it asTimes-Roman. π And get this β you can specify multiple fonts by separating the font names with semicolons. When you do that, the first font in the list that contains a given character is the one used to render that character. iconic fallback behaviour, no cap. β¨SoSFFloatsizeβ this field is the font size. The value is in points for 2D text, and in the current units for 3D text. yes bestie, the units literally change depending on the dimensionality. that's just how she is. π
π¦ METHODS π¦
SoFont()β creates a font node with default settings. fresh out the box, ready to serve. πstatic SoType getClassTypeId()β returns the type identifier for this class. it's her ID, her passport, her birth certificate. π
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
Sets the font name and size in the current traversal state. that's it, that's the whole job, and she does it every single time without complaint. a professional. π β¨
π FILE FORMAT/DEFAULTS π
Font {
name "defaultFont"
size 10
}
defaults are "defaultFont" and 10, and honestly? she ate. π
π SEE ALSO π
SoText2SoText3
go read those too bestie, they're the ones actually using all this font info. π«Ά
okay that's the whole page!! this was SoFont(3IV) β the footer just says SoFont(3IV)() with the date slot left all empty, so no date tea to spill, we're running on vibes only. πβ¨π stay slaying, and remember: set your font before your text, or your text is getting the default whether it likes it or not. ππ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms