SoVRMLFontStyle(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸŽ€ SoVRMLFontStyle πŸŽ€

okay so bestie, this is the manual page for SoVRMLFontStyle, from the Library Functions Manual. Sit down, grab a snack, we're reading the whole thing. πŸ’–


✨ NAME ✨

SoVRMLFontStyle β€” the SoVRMLFontStyle class is the one you use to define the current font. that's the whole job, and it does it slayfully. πŸ’…


🌸 SYNOPSIS 🌸

first thing's first, the include. don't forget it, she's essential:

#include <Inventor/VRMLnodes/SoVRMLFontStyle.h>

and she inherits SoNode. yes, the whole chain of nepo-baby inheritance is below, we're getting to all of it. 🫢


🌈 Public Types 🌈

the font family options, and the style bit-flags:

enum Family { SERIF, SANS, TYPEWRITER }
enum Style { PLAIN = 0x0, BOLD = 0x1, ITALIC = 0x2, BOLDITALIC = 0x3 }

πŸ¦‹ Public Types inherited from SoNode πŸ¦‹

the entire node-type roster, inherited and iconic:

enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002,
    INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010,
    INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080,
    COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 =
    0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000
    }

πŸ‘‘ Public Member Functions πŸ‘‘

her own methods, front and center:

virtual SoType getTypeId (void) const
SoVRMLFontStyle (void)
SbString getFontName (void)
virtual void doAction (SoAction *action)
virtual void callback (SoCallbackAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void pick (SoPickAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

πŸ’œ Public Member Functions inherited from SoNode

void setOverride (const SbBool state)
SbBool isOverride (void) const
void setNodeType (const NodeType type)
NodeType getNodeType (void) const
virtual SoNode * copy (SbBool copyconnections=0) const
virtual SbBool affectsState (void) const
virtual void GLRenderBelowPath (SoGLRenderAction *action)
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void GLRenderOffPath (SoGLRenderAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void search (SoSearchAction *action)
virtual void write (SoWriteAction *action)
virtual void audioRender (SoAudioRenderAction *action)
virtual void grabEventsSetup (void)
virtual void grabEventsCleanup (void)
virtual void startNotify (void)
virtual void notify (SoNotList *l)
uint32_t getNodeId (void) const
virtual SoChildList * getChildren (void) const
virtual void writeInstance (SoOutput *out)
virtual SoNode * addToCopyDict (void) const
virtual void copyContents (const SoFieldContainer *from, SbBool
    copyconnections)
virtual SoFieldContainer * copyThroughConnection (void) const

πŸ’œ Public Member Functions inherited from SoFieldContainer

void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool
    copyconnections=0)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *in)
void get (SbString &fielddata, SoOutput *out)
virtual SbBool validateNewFieldValue (SoField *field, void *newval)
virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)
SbBool getIsBuiltIn (void) const
void setUserData (void *userdata) const
void * getUserData (void) const

πŸ’œ Public Member Functions inherited from SoBase

void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual void setName (const SbName &newname)
void addAuditor (void *const auditor, const SoNotRec::Type type)
void removeAuditor (void *const auditor, const SoNotRec::Type type)
const SoAuditorList & getAuditors (void) const
SbBool shouldWrite (void)
void assertAlive (void) const

⭐ Static Public Member Functions ⭐

static SoType getClassTypeId (void)
static void initClass (void)

🌟 Static Public Member Functions inherited from SoNode

static uint32_t getCompatibilityTypes (const SoType &nodetype)
static SoType getClassTypeId (void)
static SoNode * getByName (const SbName &name)
static int getByName (const SbName &name, SoNodeList &l)
static void initClass (void)
static void initClasses (void)
static uint32_t getNextNodeId (void)
static int getActionMethodIndex (const SoType type)
static void getBoundingBoxS (SoAction *action, SoNode *node)
static void GLRenderS (SoAction *action, SoNode *node)
static void callbackS (SoAction *action, SoNode *node)
static void getMatrixS (SoAction *action, SoNode *node)
static void handleEventS (SoAction *action, SoNode *node)
static void pickS (SoAction *action, SoNode *node)
static void rayPickS (SoAction *action, SoNode *node)
static void searchS (SoAction *action, SoNode *node)
static void writeS (SoAction *action, SoNode *node)
static void audioRenderS (SoAction *action, SoNode *node)
static void getPrimitiveCountS (SoAction *action, SoNode *node)

🌟 Static Public Member Functions inherited from SoFieldContainer

static void initClass (void)
static SoType getClassTypeId (void)
static void initCopyDict (void)
static void addCopy (const SoFieldContainer *orig, const
    SoFieldContainer *copy)
static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
static SoFieldContainer * findCopy (const SoFieldContainer *orig, const
    SbBool copyconnections)
static void copyDone (void)

🌟 Static Public Member Functions inherited from SoBase

static void initClass (void)
static SoType getClassTypeId (void)
static void addName (SoBase *const base, const char *const name)
static void removeName (SoBase *const base, const char *const name)
static void incrementCurrentWriteCounter (void)
static void decrementCurrentWriteCounter (void)
static SoBase * getNamedBase (const SbName &name, SoType type)
static int getNamedBases (const SbName &name, SoBaseList &baselist,
    SoType type)
static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *in, const SbName &fromnodename,
    const SbName &fromfieldname, const SbName &tonodename, const SbName
    &tofieldname)
static SbBool readRoute (SoInput *in)

🌸 Public Attributes 🌸

the fields she actually brings to the party:

SoSFFloat size
SoMFString family
SoMFString style
SoSFBool horizontal
SoSFBool leftToRight
SoSFBool topToBottom
SoSFString language
SoMFString justify
SoSFFloat spacing

🧚 Protected Member Functions 🧚

virtual const SoFieldData * getFieldData (void) const
virtual ~SoVRMLFontStyle ()

πŸŽ€ Protected Member Functions inherited from SoNode

SoNode (void)
virtual ~SoNode ()
virtual SbBool readInstance (SoInput *in, unsigned short flags)

πŸŽ€ Protected Member Functions inherited from SoFieldContainer

SoFieldContainer (void)
~SoFieldContainer ()

πŸŽ€ Protected Member Functions inherited from SoBase

SoBase (void)
virtual ~SoBase ()
virtual void destroy (void)
SbBool hasMultipleWriteRefs (void) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine)
    const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const

πŸ’« Static Protected Member Functions πŸ’«

static const SoFieldData ** getFieldDataPtr (void)

⭐ Static Protected Member Functions inherited from SoNode

static const SoFieldData ** getFieldDataPtr (void)
static void setNextActionMethodIndex (int index)
static int getNextActionMethodIndex (void)
static void incNextActionMethodIndex (void)
static void setCompatibilityTypes (const SoType &nodetype, const
    uint32_t bitmask)

⭐ Static Protected Member Functions inherited from SoBase

static uint32_t getCurrentWriteCounter (void)
static void staticDataLock (void)
static void staticDataUnlock (void)

🌈 Additional Inherited Members 🌈

πŸ’œ Protected Types inherited from SoBase

enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }

πŸ’œ Protected Attributes inherited from SoNode

uint32_t uniqueId

πŸ’œ Protected Attributes inherited from SoFieldContainer

SbBool isBuiltIn

πŸ’œ Static Protected Attributes inherited from SoNode

static uint32_t nextUniqueId = 0
static int nextActionMethodIndex = 0

and that's the whole synopsis bestie, every single line of it, no skips, no cuts πŸ’– the actual description tea is coming up next, so don't go anywhere 🫢

✨ Detailed Description ✨

The SoVRMLFontStyle class is used to define the current font. πŸ’…

Important note: currently, the SoVRMLText node implementation is not complete, and some of the features mentioned in the documentation below may not be working yet. So like… don't come for me if a field is giving nothing bestie 😭

The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:

FontStyle {
  field MFString family       "SERIF"
  field SFBool   horizontal   TRUE
  field MFString justify      "BEGIN"
  field SFString language     ""
  field SFBool   leftToRight  TRUE
  field SFFloat  size         1.0          # (0,)
  field SFFloat  spacing      1.0          # [0,)
  field SFString style        "PLAIN"
  field SFBool   topToBottom  TRUE
}

Introduction πŸŽ€

The FontStyle node defines the size, family, and style used for Text nodes, plus the direction of the text strings and any language-specific rendering techniques used for non-English text. See SoVRMLText, for a description of the Text node. iykyk πŸ‘‘

The size field specifies the nominal height, in the local coordinate system of the Text node, of glyphs rendered and determines the spacing of adjacent lines of text. Values of the size field shall be greater than zero. 🚨

The spacing field determines the line spacing between adjacent lines of text. The distance between the baseline of each line of text is (spacing ? size) in the appropriate direction (depending on other fields described below). The effects of the size and spacing field are depicted in Figure 6.7 (spacing greater than 1.0). Values of the spacing field shall be non-negative. 🌸

FontStyle node example

Figure 6.7 -- Text size and spacing fields

Font family and style πŸ¦‹

Font attributes are defined with the family and style fields. The browser shall map the specified font attributes to an appropriate available font as described below. lowkey the browser is doing the heavy lifting here fr fr πŸ’€

The family field contains a case-sensitive MFString value that specifies a sequence of font family names in preference order. The browser shall search the MFString value for the first font family name matching a supported font family. If none of the string values matches a supported font family, the default font family "SERIF" shall be used. All browsers shall support at least "SERIF" (the default) for a serif font such as Times Roman; "SANS" for a sans-serif font such as Helvetica; and "TYPEWRITER" for a fixed-pitch font such as Courier. An empty family value 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. An empty style value ("") is identical to "PLAIN". πŸ’…


Direction and justification 🧭

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. 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. 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. The justify field 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. An empty justify value ("") is equivalent to the default value. If the second string, minor alignment, is not specified, minor alignment 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. Tables 6.2-6.5 at http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html#Table6.2 describe the behaviour in terms of which portion of the text is at the origin. πŸ‘€

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 Tables 6.6 and 6.7, each colour-coded cross-hair indicates where the X-axis and Y-axis shall be in relation to the text. Figure 6.8 describes the symbols used in Tables 6.6 and 6.7. 🌈

Figure 6.8 -- Key for Tables 6.6 and 6.7

Table 6.6 -- horizontal = TRUE

Table 6.7 -- horizontal = FALSE

Language 🌍

The language field specifies the context of the language for the text string. Due to the multilingual nature of the ISO/IEC 10646-1:1993, the language field is needed to provide a proper language attribute of the text string. The format is based on RFC 1766: language[_territory] <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html#[1766]>. The value for the language tag is based on ISO 639:1988 (e.g., 'zh' for Chinese, 'jp' for Japanese, and 'sc' for Swedish.) The territory tag is based on ISO 3166:1993 country codes (e.g., 'TW' for Taiwan and 'CN' for China for the 'zh' Chinese language tag). If the language field is empty (""), local language bindings are used. 🫢

See http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html, for more information on RFC 1766 <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html#[1766]>, ISO/IEC 10646:1993 <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html#[UTF8]>, ISO/IEC 639:1998 <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html#[I639]>, and ISO 3166:1993 <http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/references.html#[I3166]>. ⭐


πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

SoVRMLFontStyle::SoVRMLFontStyle (void )

Constructor. πŸŽ‰

References SoVRMLFontStyle().

Referenced by getClassTypeId(), and SoVRMLFontStyle(). πŸ”

SoVRMLFontStyle::~SoVRMLFontStyle () [protected], [virtual]

Destructor. πŸ’€

🫢 Member Function Documentation 🫢

okay bestie, this is where the docs start listing the actual member functions, and the vibes are chaotic but we're keeping every single crumb. no skips, no summaries, periodt. πŸ’…


SoType SoVRMLFontStyle::getClassTypeId (void ) [static]

so this one is the static class type ID getter, and then the docs immediately start listing the fields like they got distracted mid-sentence β€” iconic, honestly. Here's everything it says:

  • SoSFFloat SoVRMLFontStyle::size β€” Size of font. πŸŽ€
  • SoMFString SoVRMLFontStyle::family β€” Font family. All browsers must support "SANS", "SERIF" and "TYPEWRITER". Default value is "SERIF". ✨
  • SoMFString SoVRMLFontStyle::style β€” Font style. Can be one of "PLAIN", "BOLD", "ITALIC" or "BOLDITALIC". Default value is "PLAIN". πŸ’–
  • SoSFBool SoVRMLFontStyle::horizontal β€” TRUE if strings should be rendered horizontally. Default value is TRUE. πŸ¦‹
  • SoSFBool SoVRMLFontStyle::leftToRight β€” TRUE if strings should be rendered left to right. Default value is TRUE. 🌸
  • SoSFBool SoVRMLFontStyle::topToBottom β€” True if strings should be rendered top to bottom. Default value is TRUE. πŸ’…
  • SoSFString SoVRMLFontStyle::language β€” Text language. Empty by default. 🫢
  • SoMFString SoVRMLFontStyle::justify β€” Text justification. Can be "BEGIN", "FIRST" "MIDDLE" or "END". Default value is "BEGIN". 😭
  • SoSFFloat SoVRMLFontStyle::spacing β€” Spacing constant. Default value is 1.0. πŸ”₯
References SoVRMLFontStyle().

SoType SoVRMLFontStyle::getTypeId (void ) const [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting. ngl, this is the "what even are you, really?" function.

Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
  else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
    SoGroup * group = (SoGroup *)node;  // safe downward cast, knows the type
  }
}

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. it's giving "type system lore."

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Implements SoBase.


const SoFieldData * SoVRMLFontStyle::getFieldData (void ) const [protected], [virtual]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. short and sweet, we love a direct answer.

Reimplemented from SoFieldContainer.


void SoVRMLFontStyle::doAction (SoAction * action) [virtual]

This function performs the typical operation of a node for any action. the "do the thing" function, fr fr.

Reimplemented from SoNode.


void SoVRMLFontStyle::callback (SoCallbackAction * action) [virtual]

Action method for SoCallbackAction.

Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. scene graph gossip, basically.

Reimplemented from SoNode.


void SoVRMLFontStyle::GLRender (SoGLRenderAction * action) [virtual]

Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. throw those primitives, bestie!

Reimplemented from SoNode.


void SoVRMLFontStyle::getBoundingBox (SoGetBoundingBoxAction * action) [virtual]

Action method for the SoGetBoundingBoxAction.

Calculates bounding box and center coordinates for node and modifies the values of the action to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node. math but make it scene-graph drama.

Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables.

Reimplemented from SoNode.


void SoVRMLFontStyle::pick (SoPickAction * action) [virtual]

Action method for SoPickAction.

Does common processing for SoPickAction action instances. pick me, choose me, process me.

Reimplemented from SoNode.


void SoVRMLFontStyle::getPrimitiveCount (SoGetPrimitiveCountAction * action) [virtual]

Action method for the SoGetPrimitiveCountAction.

Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action. counting triangles like it's a group chat unread badge.

Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.

Reimplemented from SoNode.


✨ Author ✨

Generated automatically by Doxygen for Coin from the source code. the robots wrote it, and they ate.


and that's the whole thing, bestie. this page is from Coin, Version 2.5.0, and the manual page is SoVRMLFontStyle(3). πŸ’–πŸ¦‹ no date line in sight, but the footer energy is immaculate. periodt.

πŸ“¦ where this page comes from