SoFont(3)

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

🌸 SoFont πŸ’…

okay bestie, sit down, hydrate, because we're about to read a manual page together and honestly? it's giving iconic. this is SoFont(3) from the Library Functions Manual and it's literally the vibe-setter for fonts in Coin. no cap. πŸŽ€


✨ NAME ✨

SoFont β€” the SoFont class is an appearance node for setting fonts. that's the whole gig. it shows up, it sets the font, it slays. periodt. πŸ’–


🌈 SYNOPSIS 🌈

first things first, you gotta pull it in:

#include <Inventor/nodes/SoFont.h>
  • Inherits SoNode.
  • Inherited by SoFontStyle. (yeah, SoFontStyle is the child node and it knows it. main character energy runs in the family. πŸ‘‘)

πŸ’« Public Member Functions πŸ’«

these are the ones that belong to SoFont itself, bestie, and there are 7 of them:

  • virtual SoType getTypeId (void) const β€” tells you the type id of this node. it's how the library knows who this node is at runtime. πŸ¦‹
  • SoFont (void) β€” the constructor. makes you a brand new SoFont. hi bestie!! 🫢
  • virtual void doAction (SoAction *action) β€” lets the node do its thing when an action comes through. it's the entry point basically.
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” contributes to the bounding box computation. important for knowing where stuff actually is. πŸ“
  • virtual void GLRender (SoGLRenderAction *action) β€” the actual OpenGL rendering step. this is where the visuals happen. πŸ’…
  • virtual void callback (SoCallbackAction *action) β€” fires callbacks for the geometry this node produces. so the callback action can walk everything.
  • virtual void pick (SoPickAction *action) β€” handles picking, aka "did the user click on me?" energy. πŸ”
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” reports how many primitives this thing is spitting out. useful for counting, obviously. πŸ”’

🌸 Public Member Functions inherited from SoNode 🌸

inherited, but still hers by right. πŸ’œ

  • void setOverride (const SbBool state) β€” flips override mode on or off.
  • SbBool isOverride (void) const β€” tells you whether override is on.
  • void setNodeType (const NodeType type) β€” sets the node type.
  • NodeType getNodeType (void) const β€” returns the node type.
  • virtual SoNode * copy (SbBool copyconnections=FALSE) const β€” makes a copy of the node. copyconnections defaults to FALSE.
  • virtual SbBool affectsState (void) const β€” reports whether this node messes with traversal state.
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” the "below path" branch of GL rendering.
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” the "in path" branch of GL rendering.
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” the "off path" branch of GL rendering. yes, there are three. no, we're not skipping any of them. 😀
  • virtual void getMatrix (SoGetMatrixAction *action) β€” hands the matrix to the action.
  • virtual void handleEvent (SoHandleEventAction *action) β€” deals with incoming events.
  • virtual void rayPick (SoRayPickAction *action) β€” the ray-picking flavour of picking. πŸ”¦
  • virtual void search (SoSearchAction *action) β€” participates in searches.
  • virtual void write (SoWriteAction *action) β€” writes itself out.
  • virtual void audioRender (SoAudioRenderAction *action) β€” the audio rendering hook. yes audio. we contain multitudes. 🎧
  • virtual void grabEventsSetup (void) β€” sets up event grabbing.
  • virtual void grabEventsCleanup (void) β€” tears the grabbing back down.
  • virtual void startNotify (void) β€” kicks off notification.
  • virtual void notify (SoNotList *l) β€” propagates notification through the list l.
  • uint32_t getNodeId (void) const β€” gives you this node's id. it's a uint32_t, she's precise.
  • virtual SoChildList * getChildren (void) const β€” returns the child list pointer.
  • virtual void writeInstance (SoOutput *out) β€” writes out the instance data.
  • virtual SoNode * addToCopyDict (void) const β€” registers itself in the copy dictionary.
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections) β€” copies the contents over from from.
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copies through a connection. connections are complicated, we don't make the rules. πŸ™ˆ

πŸ¦‹ Public Member Functions inherited from SoFieldContainer πŸ¦‹

  • void setToDefaults (void) β€” resets everything back to defaults.
  • SbBool hasDefaultValues (void) const β€” are all the values default? yes or no, no in-between.
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” compares fields against container.
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE) β€” copies field values from container, with copyconnections defaulting to FALSE.
  • SbBool set (const char *const fielddata) β€” sets fields from a string of fielddata.
  • void get (SbString &fielddata) β€” reads the fields out into fielddata.
  • virtual int getFields (SoFieldList &l) const β€” fills l with the fields, returns a count.
  • virtual int getAllFields (SoFieldList &l) const β€” same but all of them. go big. ✨
  • virtual SoField * getField (const SbName &name) const β€” looks up a field by name.
  • virtual SoField * getEventIn (const SbName &name) const β€” looks up an event-in by name.
  • virtual SoField * getEventOut (const SbName &name) const β€” looks up an event-out by name.
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” gives you the name of a given field.
  • SbBool enableNotify (const SbBool flag) β€” turns notification on or off.
  • SbBool isNotifyEnabled (void) const β€” is notification enabled rn?
  • SbBool set (const char *fielddata, SoInput *input) β€” the SoInput flavour of set.
  • void get (SbString &fielddata, SoOutput *out) β€” the SoOutput flavour of get.
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” validates a proposed new value for field.
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE) β€” adds a write reference, isfromfield defaulting to FALSE.
  • SbBool getIsBuiltIn (void) const β€” is it built in?
  • virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) const β€” reports memory usage split into managed and unmanaged. ✨
  • void setUserData (void *userdata) const β€” attaches your own userdata pointer. go off, store whatever you want.
  • void * getUserData (void) const β€” gets that userdata pointer back.

πŸ’– Public Member Functions inherited from SoBase πŸ’–

  • void ref (void) const β€” bumps the reference count. classic.
  • void unref (void) const β€” drops the reference count.
  • void unrefNoDelete (void) const β€” drops the ref count but does not delete. sneaky but valid.
  • int32_t getRefCount (void) const β€” tells you the current ref count.
  • void touch (void) β€” touches the node so it notifies.
  • SbBool isOfType (SoType type) const β€” is it this type?
  • virtual SbName getName (void) const β€” returns the name.
  • virtual void setName (const SbName &newname) β€” sets the name to newname.
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” adds an auditor of the given type.
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” removes that auditor.
  • const SoAuditorList & getAuditors (void) const β€” hands you the whole auditor list.
  • SbBool shouldWrite (void) β€” should this be written out?
  • void assertAlive (void) const β€” asserts that the object is still alive. dramatic? maybe. necessary? absolutely. πŸ’€

⭐ Static Public Member Functions ⭐

  • static SoType getClassTypeId (void) β€” the class type id. static, so you don't even need an instance. πŸ’…
  • static void initClass (void) β€” initialises the class. call it, bestie.

🌟 Static Public Member Functions inherited from SoNode 🌟

  • static uint32_t getCompatibilityTypes (const SoType &nodetype) β€” returns the compatibility bitmask for nodetype.
  • static SoType getClassTypeId (void) β€” class type id, again, but for SoNode.
  • static SoNode * getByName (const SbName &name) β€” finds a node by name.
  • static int getByName (const SbName &name, SoNodeList &l) β€” fills l with all nodes matching name and returns a count.
  • static void initClass (void) β€” initialises SoNode.
  • static void initClasses (void) β€” initialises all the classes. plural. she's thorough. πŸ‘‘
  • static uint32_t getNextNodeId (void) β€” hands out the next node id.
  • static int getActionMethodIndex (const SoType type) β€” the action method index for type.
  • static void getBoundingBoxS (SoAction *action, SoNode *node) β€” static bounding box helper for node.
  • static void GLRenderS (SoAction *action, SoNode *node) β€” static GL render helper for node.
  • static void callbackS (SoAction *action, SoNode *node) β€” static callback helper for node.
  • static void getMatrixS (SoAction *action, SoNode *node) β€” static matrix helper for node.
  • static void handleEventS (SoAction *action, SoNode *node) β€” static event handling helper for node.
  • static void pickS (SoAction *action, SoNode *node) β€” static pick helper for node.
  • static void rayPickS (SoAction *action, SoNode *node) β€” static ray pick helper for node.
  • static void searchS (SoAction *action, SoNode *node) β€” static search helper for node.
  • static void writeS (SoAction *action, SoNode *node) β€” static write helper for node.
  • static void audioRenderS (SoAction *action, SoNode *node) β€” static audio render helper for node.
  • static void getPrimitiveCountS (SoAction *action, SoNode *node) β€” static primitive count helper for node.

πŸŽ€ Static Public Member Functions inherited from SoFieldContainer πŸŽ€

  • static void initClass (void) β€” initialises the class.
  • static SoType getClassTypeId (void) β€” class type id.
  • static void cleanupClass (void) β€” cleans up after the class. self-care. πŸ§–
  • static void initCopyDict (void) β€” sets up the copy dictionary.
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” registers copy as the copy of orig.
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” checks the copy dict for orig.
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” finds the copy of orig, respecting copyconnections.
  • static void copyDone (void) β€” signals that copying is done. bye bestie. πŸ‘‹

πŸ’œ Static Public Member Functions inherited from SoBase πŸ’œ

  • static void initClass (void) β€” initialises the class.
  • static SoType getClassTypeId (void) β€” class type id.
  • static void addName (SoBase *const base, const char *const name) β€” gives base a name.
  • static void removeName (SoBase *const base, const char *const name) β€” takes that name away again.
  • static void incrementCurrentWriteCounter (void) β€” bumps the current write counter.
  • static void decrementCurrentWriteCounter (void) β€” drops it back down.
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” fetches a named base of the given type.
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” fills baselist with named bases of type and returns a count.
  • static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype) β€” reads a base from input, expecting expectedtype.
  • static void setInstancePrefix (const SbString &c) β€” sets the instance prefix to c.
  • static void setTraceRefs (SbBool trace) β€” turns ref tracing on or off.
  • static SbBool getTraceRefs (void) β€” is ref tracing on?
  • static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” connects a route from fromnodename.fromfieldname to tonodename.tofieldname. wiring up the group chat. πŸ”Œ
  • static SbBool readRoute (SoInput *input) β€” reads a route from input.

πŸ“ Public Attributes πŸ“

these are the actual fields you can poke at, bestie. only two, and they're both doing the most:

  • SoSFName name β€” the font name. it's an SoSFName. πŸ’…
  • SoSFFloat size β€” the font size. it's an SoSFFloat.

🌸 Protected Member Functions 🌸

for the subclasses only. private-ish, but make it fashion.

  • virtual const SoFieldData * getFieldData (void) const β€” returns the field data.
  • virtual ~SoFont () β€” the destructor.

🌈 Protected Member Functions inherited from SoNode 🌈

  • SoNode (void) β€” constructor.
  • virtual ~SoNode () β€” destructor.
  • virtual SbBool readInstance (SoInput *in, unsigned short flags) β€” reads an instance from in with flags.

πŸ’– Protected Member Functions inherited from SoFieldContainer πŸ’–

  • SoFieldContainer (void) β€” constructor.
  • virtual ~SoFieldContainer () β€” destructor.

πŸ¦‹ Protected Member Functions inherited from SoBase πŸ¦‹

  • SoBase (void) β€” constructor.
  • virtual ~SoBase () β€” destructor.
  • virtual void destroy (void) β€” destroys it.
  • SbBool hasMultipleWriteRefs (void) const β€” does it have multiple write refs?
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” writes the header, with isgroup and isengine flags.
  • void writeFooter (SoOutput *out) const β€” writes the footer. every header deserves a footer. πŸŽ€
  • virtual const char * getFileFormatName (void) const β€” the file format name.

✨ Static Protected Member Functions ✨

  • static const SoFieldData ** getFieldDataPtr (void) β€” pointer to the field data pointer. yes it's a pointer to a pointer. yes that's the vibe. πŸ’…

⭐ Static Protected Member Functions inherited from SoNode ⭐

  • static const SoFieldData ** getFieldDataPtr (void) β€” the SoNode version.
  • static void setNextActionMethodIndex (int index) β€” sets the next action method index.
  • static int getNextActionMethodIndex (void) β€” gets the next action method index.
  • static void incNextActionMethodIndex (void) β€” increments it.
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” sets compatibility types for nodetype to bitmask.

🌟 Static Protected Member Functions inherited from SoBase 🌟

  • static uint32_t getCurrentWriteCounter (void) β€” the current write counter.
  • static void staticDataLock (void) β€” locks the static data.
  • static void staticDataUnlock (void) β€” unlocks it. balance. 🧘

πŸ’œ Additional Inherited Members πŸ’œ

the extra lore. the deep cuts. we love her for it.


πŸŽ€ Public Types inherited from SoNode πŸŽ€

here's the NodeType enum, every single value, no skipping:

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,
    COIN_3_0 = 0x8000,
    INVENTOR_6_0 = 0x10000
}

🌸 Protected Types inherited from SoBase 🌸

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

πŸ¦‹ Protected Attributes inherited from SoNode πŸ¦‹

  • uint32_t uniqueId β€” the unique id. she's one of a kind, literally. πŸ‘‘

πŸ’– Protected Attributes inherited from SoFieldContainer πŸ’–

  • SbBool isBuiltIn β€” whether it's built in.

✨ Static Protected Attributes inherited from SoNode ✨

  • static uint32_t nextUniqueId = 1 β€” starts at 1.
  • static int nextActionMethodIndex = 0 β€” starts at 0.

🌸 Detailed Description 🌸

okay bestie, so the SoFont class is an appearance node for setting fonts. that's the whole job. she sets the font, she moves on. πŸ’…

Successive text rendering nodes (like SoText2, SoText3, SoAsciiText, etc) will use the font specified from an SoFont node when visualizing text. so basically she's the girl behind the scenes making sure your text looks right. main character energy but for fonts. ✨

The font name is recognized with the form "family:style". The range of supported font families depends on which fonts are installed on the system. A typical font family might be "Arial" or "Times NewRoman". lowkey it's giving "depends on your machine" and that's just how it is 🫢

Style is either "Bold", "Italic" or "Bold Italic". that's the whole menu, no secret fourth option, periodt.

Spaces before or after the ":" will be ignored. so go ahead and be messy with your spacing, she does not care πŸ’…

If a good match for the chosen font cannot be found, the default font will be loaded instead. The default 2D font is a builtin 8x12 points font. The 3D font is a serif font ala Times New Roman. It is not possible to apply styles to any of the builtin fonts. It is not possible to specify a size for the default 2D font. so yeah, the fallback is giving "we tried our best" and you're gonna accept her as she is 😭

One can explicitly select the default font by setting "defaultFont" as the font name, or by just leaving the SoFont::name field alone, as it has that value by default. In that regard, note that SoFont does not inherit / accumulate any parts from earlier SoFont-nodes, even when one or both of its fields are left blank in e.g. an iv-file, like this:

#Inventor V2.1 ascii

Font { name "Helvetica"  size 50 }
Text2 { string "hepp" }

Translation { translation 5 80 0 }

BaseColor { rgb 1 1 0 }

Font { size 30 }
Text2 { string "svupp" }

(The second string in the above example will be rendered with the default built-in font, not in Helvetica.) like. she does not remember what the last girl said. no carried-over vibes. each node is her own independent queen πŸ‘‘

The default fonts are always accessible by Coin as they are embedded into the run-time library. If one needs to guarantee that the text will have the same appearance under all circumstances, the default font will be a safe choice. Another solution might be to use the FreeType font engine and explicitly name a font-file. This is described in more detail below. πŸ’–

Here is a simple example on how to print a string using a bold and italic Arial font:

#Inventor V2.1 ascii

Separator {
   Font {
     name "Arial:Bold Italic"
     size 14
   }
   Text2 {
     string ["This is a", "Coin font test"]
     justification CENTER
   }
}

Coin has support for two different font APIs. On non-Windows platforms, the FreeType library together with the optional Fontconfig library is used. two APIs, one queen, iconic behavior honestly πŸŽ€

If the Fontconfig library is installed the font file on the sytem for a given font name will be located through it. For more information on Fontconfig see http://freedesktop.org/software/fontconfig . Additionally Fontconfig allows to match specific fonts through its own pattern matching format (see http://pdx.freedesktop.org/~fontconfig/fontconfig-user.html). Please note that the point size value in the textual representation of the Fontconfig pattern is currently overriden by the size field of the SoFont node and if no size field is specified the default value of the size field is in effect. In case you intend to use your application on systems where the Fontconfig library is expected to be not installed you should not make use of Fontconfig's font pattern syntax. Fontconfig usage can be prevented by setting the "COIN_FORCE_FONTCONFIG_OFF" environment variable to 1. πŸ¦‹

Here is an example on how to print a string using the Fontconfig pattern matching syntax using a bold & italic font where Times New Roman is the preferred font family.

#Inventor V2.1 ascii

Separator {
   Font {
     name "Times New Roman,Arial,Helvetica:italic:bold"
     size 24
   }
   Text2 {
     string ["This is a", "Coin font test"]
     justification CENTER
   }
}

On Windows the Win32 GDI library is used. FreeType and Fontconfig are dynamically loaded on demand by Coin if font support are requested by a node. When fontsupport is loaded on Windows, FreeType will have precedence over Win32 if located. This can be prevented by setting the "COIN_FORCE_FREETYPE_OFF" environment variable to 1. When using FreeType, you need FreeType version 2.1 or later. On Mac OS X, version 2.1.7 or later is required. no old versions allowed, she said what she said πŸ’…

If Coin cannot load the FreeType library, and is not running on Microsoft Windows, only the default fonts will be accessible. πŸ’€

It is possible to specify the TrueType font file directly if FreeType is used as the font engine. This is done by including the ".ttf" in the filename, i.e. "Comic_Sans_MS.ttf". Coin will then search the local path for the running program and then the path specified by the "COIN_FONT_PATH" environment variable. If the program is using FreeType on a Windows platform, the "$WINDIR/Fonts" directory will also be searched. 🧚

It is not possible to directly specify a TrueType font file if Windows is handling the fonts. This is due to the way Windows is accessing the fonts through the system registry. All fonts must therefore be properly installed and given a system name. Open the "Control Panel" and double click on the "Fonts" icon for an overview of installed fonts and their names. windows being windows, we love a chaotic registry moment 😭

Beware that some non-English versions of Windows are using different name for the styles (i.e. "Italique" instead of "Italic"). These names are supported in Coin, but it is recommended for portability purposes to only use the English terms. Please note that there is still a possibility that there are no fonts installed using the terms "Bold" or "Italic" on the Windows platform. To guarantee that a font is accessible you must either use the FreeType library and include a TrueType font in your distribution, or you must avoid using styles and stick to the standard Windows fonts.

If the "COIN_DEBUG_FONTSUPPORT" environment variable is set to 1, an extensive amount of information about loading, initializing and using fonts will be output. Issues like missing fonts and other related problems will then be reported, so we advice you to first try to use that debugging option when something does not work quite as expected. fr fr, turn on the debug flag before you start spiraling πŸ™ˆ

FILE FORMAT/DEFAULTS:

Font {
    name "defaultFont"
    size 10
}

See also

SoFontStyle, SoGlyph, SoText2, SoText3, SoAsciiText


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoFont::SoFont (void )

Constructor. she's born ✨

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

Destructor. she's gone but never forgotten πŸ’”


πŸ’œ Member Function Documentation πŸ’œ

SoType SoFont::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. it's the "who are you really" check bestie πŸ•΅οΈ

Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)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. ✨

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

Implements SoBase.

Reimplemented in SoFontStyle.

const SoFieldData * SoFont::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. 🫢

Reimplemented from SoFieldContainer.

Reimplemented in SoFontStyle.

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

This function performs the typical operation of a node for any action. she does the thing, whatever the thing is πŸ’…

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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. πŸ“

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

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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. throwing primitives at OpenGL is a whole mood πŸ”₯

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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. just updating state and minding her business ✨

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

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

Action method for SoPickAction.

Does common processing for SoPickAction action instances.

Reimplemented from SoNode.

Reimplemented in SoFontStyle.

void SoFont::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, lines and points like the little math girlie she is πŸŽ€

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

Reimplemented from SoNode.

Reimplemented in SoFontStyle.


🌈 Member Data Documentation 🌈

SoSFName SoFont::name

Name of font. πŸ‘‘

Which fontnames are available is rather system dependent, not only on whether or not you are running on a UNIX/Linux system, Microsoft Windows or whatever, but also on which fonts and font types (like TrueType) are installed on a particular user's system. it's giving "it depends" and honestly that's just the vibe 😭

All font rendering nodes have a built-in fallback font to use, though, so even though Coin can not find a font on the system of the specified type, the text should be rendered somehow. she always has a backup plan πŸ’–

In summation, consider this node type and this particular field as a hint to the font rendering engines of Coin, and do not base your models on a particular font being available. it's a suggestion, not a promise, no cap 🫢

SoSFFloat SoFont::size

Size of font. Defaults to 10.0.

For 2D rendered bitmap fonts (like for SoText2), this value is the height of a character in screen pixels. For 3D text, this value is the world-space coordinates height of a character in the current units setting (see documentation for SoUnits node). pixels for 2D, world-space units for 3D, two completely different girlies sharing one field ✨

✨ Author ✨

Okay so plot twist bestie β€” nobody actually sat down and wrote this page πŸ˜­πŸ’€ It was generated automatically by Doxygen for Coin from the source code. Like, the robots did it. No human author, no signature, no little "β€” written by your girl at 3am" moment. Just Doxygen doing its thing, fr fr πŸ€–βœ¨

So if something on here reads a lil weird? Not a person's fault, it's the doc generator's whole vibe. iykyk πŸ’…


Coin Β· Version 3.1.3 Β· SoFont(3) πŸŽ€

And that's the whole page, bestie β€” you made it to the end πŸŒˆπŸ‘‘ Go forth and be iconic with your fonts βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from