# TK_Text_Font

## Functions

| `TK_Text_Font`
| `~TK_Text_Font`
`TK_Status` | `Read`
`TK_Status` | `Write`
`TK_Status` | `Clone`
`TK_Status` | `ReadAscii`
`TK_Status` | `WriteAscii`
void | `Reset`
void | `SetMask`
int | `GetMask`
void | `SetValue`
int | `GetValue`
void | `SetNames`
void | `SetNames`
char const * | `GetNames`
char * | `GetNames`
void | `SetShape`
void | `SetShape`
char const * | `GetShape`
char * | `GetShape`
void | `SetStyle`
void | `SetStyle`
char const * | `GetStyle`
char * | `GetStyle`
void | `SetSize`
float | `GetSize`
void | `SetSizeUnits`
int | `GetSizeUnits`
void | `SetTolerance`
float | `GetTolerance`
void | `SetToleranceUnits`
int | `GetToleranceUnits`
void | `SetRotation`
float | `GetRotation`
void | `SetSlant`
float | `GetSlant`
void | `SetWidthScale`
float | `GetWidthScale`
void | `SetExtraSpace`
float | `GetExtraSpace`
void | `SetExtraSpaceUnits`
int | `GetExtraSpaceUnits`
void | `SetLineSpacing`
float | `GetLineSpacing`
void | `SetTransforms`
int | `GetTransforms`
void | `SetGreekingLimit`
float | `GetGreekingLimit`
void | `SetGreekingLimitUnits`
int | `GetGreekingLimitUnits`
void | `SetGreekingMode`
int | `GetGreekingMode`
void | `SetRenderer`
int | `GetRenderer`
void | `SetRenderers`
int const * | `GetRenderers`
void | `SetRendererCutoff`
float | `GetRendererCutoff`
void | `SetRendererCutoffUnits`
int | `GetRendererCutoffUnits`
void | `SetPreference`
int | `GetPreference`
void | `SetPreferences`
int const * | `GetPreferences`
void | `SetPreferenceCutoff`
float | `GetPreferenceCutoff`
void | `SetPreferenceCutoffUnits`
int | `GetPreferenceCutoffUnits`
void | `SetLayout`
int | `GetLayout`

## Detailed Description

class `TK_Text_Font` : public BBaseOpcodeHandler

  Handles the TKE_Text_Font opcode.

  TK_Text_Font provides support for writing/reading the TKE_Text_Font opcode object to/from an HSF file.

  The HOOPS/3dGS scene-graph supports various text attributes. Text_Font contains information about the font, including name, size, size units, spacing, spacing units, tolerance, tolerance units, slant, transforms, rotation and width scaling.

  Public Functions

  inline `TK_Text_Font`()

    constructor

  `~TK_Text_Font`()
  virtual TK_Status `Read`(BStreamFileToolkit &tk)

    Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

    Parameters: | tk – A reference to the BStreamFileToolkit object.
    Returns: | The result of the function call.

  virtual TK_Status `Write`(BStreamFileToolkit &tk)

    Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

    Parameters: | tk – A reference to the BStreamFileToolkit object.
    Returns: | The result of the function call.

  virtual TK_Status `Clone`(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

    Copies the opcode handler

    Parameters: | tk – A reference to the BStreamFileToolkit object. handler – A pointer to the opcode handler object. Passed by reference.
    Returns: | The result of the function call.

  TK_Status `ReadAscii`(BStreamFileToolkit &tk)

    Deprecated.

  TK_Status `WriteAscii`(BStreamFileToolkit &tk)

    Deprecated.

  virtual void `Reset`()

    Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

  inline void `SetMask`(int m)

    Sets the mask indicating which font options are specified. Options are defined in TKO_Font_Options.

  inline int `GetMask`() const

    Returns the mask indicating which font options are specified. Options are defined in TKO_Font_Options.

  inline void `SetValue`(int v)

    Sets the mask indicating which font options are on/active. Options are defined in TKO_Font_Options.

  inline int `GetValue`() const

    Returns the mask indicating which font options are on/active. Options are defined in TKO_Font_Options.

  inline void `SetNames`(char const *names)

    Sets the font names. Allocates the buffer and copies the names string

  inline void `SetNames`(int length)

    Sets the font names buffer. Allocates a buffer large enough to hold a string of ‘length’ characters

  inline char const *`GetNames`() const

    Returns the font names string

  inline char *`GetNames`()

    Returns the font names string buffer, which may be modified directly

  void `SetShape`(char const *shape)

    Sets the font background shape. Allocates the buffer and copies the shape string

  void `SetShape`(int length)

    Sets the font background shape buffer. Allocates a buffer large enough to hold a string of ‘length’ characters

  inline char const *`GetShape`() const

    Returns the font background shape string

  inline char *`GetShape`()

    Returns the font background shape string buffer, which may be modified directly

  void `SetStyle`(char const *shape)

    Sets the font background/leader style. Allocates the buffer and copies the shape string

  void `SetStyle`(int length)

    Sets the font background/leader style buffer. Allocates a buffer large enough to hold a string of ‘length’ characters

  inline char const *`GetStyle`() const

    Returns the font background/leader style string

  inline char *`GetStyle`()

    Returns the font background/leader style string buffer, which may be modified directly

  inline void `SetSize`(float s)

    Sets the text size

  inline float `GetSize`() const

    Returns the text size

  inline void `SetSizeUnits`(int u)

    Sets the units used to interpret the size. Units are defined in #TKO_Font_Size_Units.

  inline int `GetSizeUnits`() const

    Returns the units used to interpret the size. Units are defined in #TKO_Font_Size_Units.

  inline void `SetTolerance`(float t)

    Sets the text size tolerance

  inline float `GetTolerance`() const

    Returns the text size tolerance

  inline void `SetToleranceUnits`(int u)

    Sets the units used to interpret the size tolerance. Units are defined in #TKO_Font_Size_Units.

  inline int `GetToleranceUnits`() const

    Returns the units used to interpret the size tolerance. Units are defined in #TKO_Font_Size_Units.

  inline void `SetRotation`(float r)

    Sets the rotation angle of characters

  inline float `GetRotation`() const

    Returns the rotation angle of characters

  inline void `SetSlant`(float s)

    Sets the slant factor applied to characters

  inline float `GetSlant`() const

    Returns the slant factor applied to characters

  inline void `SetWidthScale`(float s)

    Sets the horizontal scaling applied to characters

  inline float `GetWidthScale`() const

    Returns the horizontal scaling applied to characters

  inline void `SetExtraSpace`(float s)

    Sets the amount of extra space inserted between characters

  inline float `GetExtraSpace`() const

    Returns the amount of extra space inserted between characters

  inline void `SetExtraSpaceUnits`(int u)

    Sets the units used to interpret the extra space. Units are defined in #TKO_Font_Size_Units.

  inline int `GetExtraSpaceUnits`() const

    Returns the units used to interpret the extra space. Units are defined in #TKO_Font_Size_Units.

  inline void `SetLineSpacing`(float s)

    Sets the spacing between lines of multi-line strings

  inline float `GetLineSpacing`() const

    Returns the spacing between lines of multi-line strings

  inline void `SetTransforms`(int t)

    Sets how the string is affected by any modeling transforms. Transforms are defined in TKO_Font_Transforms.

  inline int `GetTransforms`() const

    Returns how the string is affected by any modeling transforms. Transforms are defined in TKO_Font_Transforms.

  inline void `SetGreekingLimit`(float s)

    Sets the limit below which text drawing will be “greeked” (not drawn or drawn as simple geometry)

  inline float `GetGreekingLimit`() const

    Returns the greeking limit

  inline void `SetGreekingLimitUnits`(int u)

    Sets the units used to interpret the greeking limit. Units are defined in #TKO_Font_Size_Units.

  inline int `GetGreekingLimitUnits`() const

    Returns the units used to interpret the greeking limit. Units are defined in #TKO_Font_Size_Units.

  inline void `SetGreekingMode`(int m)

    Sets the method used for handling greeked text.

  inline int `GetGreekingMode`() const

    Returns the method used for handling greeked text.

  inline void `SetRenderer`(int r)

    Sets which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

  inline int `GetRenderer`() const

    Returns which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

  inline void `SetRenderers`(int r1, int r2)

    Sets which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

  inline int const *`GetRenderers`() const

    Returns which types of fonts may be used. Renderers are defined in TKO_Font_Renderers.

  inline void `SetRendererCutoff`(float s)

    Sets the limit below which text drawing will use the “lower” renderer

  inline float `GetRendererCutoff`() const

    Returns the renderer cutoff limit

  inline void `SetRendererCutoffUnits`(int u)

    Sets the units used to interpret the renderer cutoff. Units are defined in #TKO_Font_Size_Units.

  inline int `GetRendererCutoffUnits`() const

    Returns the units used to interpret the renderer cutoff. Units are defined in #TKO_Font_Size_Units.

  inline void `SetPreference`(int r)

    Sets which drawing modes may be used. Preferences are defined in TKO_Font_Preferences.

  inline int `GetPreference`() const

    Returns which types of fonts may be used. Preferences are defined in TKO_Font_Preferences.

  inline void `SetPreferences`(int r1, int r2)

    Sets which drawing modes may be used. Preferences are defined in TKO_Font_Preferences.

  inline int const *`GetPreferences`() const

    Returns which types of fonts may be used. Preferences are defined in TKO_Font_Preferences.

  inline void `SetPreferenceCutoff`(float s)

    Sets the limit below which text drawing will use the “lower” preference

  inline float `GetPreferenceCutoff`() const

    Returns the preference cutoff limit

  inline void `SetPreferenceCutoffUnits`(int u)

    Sets the units used to interpret the preference cutoff. Units are defined in #TKO_Font_Size_Units.

  inline int `GetPreferenceCutoffUnits`() const

    Returns the units used to interpret the preference cutoff. Units are defined in #TKO_Font_Size_Units.

  inline void `SetLayout`(int l)

    Sets the layout. Layouts are defined in TKO_Font_Layout.

  inline int `GetLayout`() const

    Returns the layout. Layouts are defined in TKO_Font_Layout.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize 3DF or choose a sample question below to start a conversation:

What is HOOPS Visualize 3DF?
What are the latest release notes for HOOPS Visualize 3DF?
How do I start evaluating HOOPS Visualize 3DF?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...