| GL Studio C++ Runtime API

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GlsUnicodeFontDBUFReader Class Reference

`#include <gls_unicode_font_base.h>`

## Public Member Functions
| GlsUnicodeFontDBUFReader (const unsigned char *const *inlineDBUFData, const unsigned int lineLength, const unsigned int totalInlineSize, const bool isCompressed, unsigned long uncompressedSize)
| GlsUnicodeFontDBUFReader (const unsigned char *const dbufData, const unsigned int dbufDataLength)
| ~GlsUnicodeFontDBUFReader ()
GlsFontBase::FontAttr_t | GetGlsFontBaseFontAttributes ()
GlsFontBase::AttrCont_t | GetGlsFontBaseCharAttributes ()
Image * | GetGlsFontBaseTexture ()
GlsUnicodeFontBase::FontAttrUnicode_t | GetGlsUnicodeFontBaseFontAttributes ()
GlsUnicodeFontBase::AttrContUnicode_t | GetGlsUnicodeFontBaseCharAttributes ()
std::vector< Image * > | GetGlsUnicodeFontBaseTextures ()
bool | IsValid () const
std::string | GetErrorMsg () const

## Protected Member Functions
void | InitializeFromDBUF (const unsigned char *const dbufData, const unsigned int dbufDataLength)

## Protected Attributes
bool | _isValid
std::string | _errMsg
GlsUnicodeFontBase::FontAttrUnicode_t | _fontAttrUnicode
GlsUnicodeFontBase::AttrContUnicode_t | _charAttrUnicode
std::vector< Image * > | _fontTextures

## Detailed Description

helper class for reading a binary unicode font (DBUF)

## Constructor & Destructor Documentation

## ◆ GlsUnicodeFontDBUFReader() [1/2]

GlsUnicodeFontDBUFReader | ( | const unsigned char *const * | inlineDBUFData,
|  | const unsigned int | lineLength,
|  | const unsigned int | totalInlineSize,
|  | const bool | isCompressed,
|  | unsigned long | uncompressedSize
| ) |  |

ctor – construct from inline data (optionally compressed)

Parameters

  inlineDBUFData | inline DBUF data to read
  lineLength | length of lines in inline data
  totalInlineSize | total number of bytes (not including NULL terminators) of inline data
  isCompressed | true if dbuf data is zlib compressed else false
  uncompressedSize | uncompressed size of data if isCompressed else ignored

## ◆ GlsUnicodeFontDBUFReader() [2/2]

GlsUnicodeFontDBUFReader | ( | const unsigned char *const | dbufData,
|  | const unsigned int | dbufDataLength
| ) |  |

ctor – construct from noninline data (not compressed)

Parameters

  dbufData | DBUF data to read
  dbufDataLength | number of bytes of data in dbufData

## ◆ ~GlsUnicodeFontDBUFReader()

~GlsUnicodeFontDBUFReader | ( |  | ) |

dtor

## Member Function Documentation

## ◆ GetErrorMsg()

std::string GetErrorMsg | ( |  | ) | const

Get an error message if !IsValid()

Returns
  an error message if !IsValid()

## ◆ GetGlsFontBaseCharAttributes()

GlsFontBase::AttrCont_t GetGlsFontBaseCharAttributes | ( |  | ) |

Get the GlsFontBase::AttrCont_t associated with the unicode font

Returns
  the GlsFontBase::AttrCont_t associated with the unicode font

## ◆ GetGlsFontBaseFontAttributes()

GlsFontBase::FontAttr_t GetGlsFontBaseFontAttributes | ( |  | ) |

Get the GlsFontBase::FontAttr_t associated with the unicode font

Returns
  the GlsFontBase::FontAttr_t associated with the unicode font

## ◆ GetGlsFontBaseTexture()

Image * GetGlsFontBaseTexture | ( |  | ) |

Get the first image associated with the unicode font (suitable for use by GlsFontBase)

Returns
  the first image associated with the unicode font (suitable for use by GlsFontBase)

Note
  will increase usage count on texture by one so caller should call DeleteUsage when texture is no longer needed

## ◆ GetGlsUnicodeFontBaseCharAttributes()

GlsUnicodeFontBase::AttrContUnicode_t GetGlsUnicodeFontBaseCharAttributes | ( |  | ) |

Get the GlsUnicodeFontBase::AttrContUnicode_t associated with the unicode font

Returns
  the GlsFontBase::AttrContUnicode_t associated with the unicode font

## ◆ GetGlsUnicodeFontBaseFontAttributes()

GlsUnicodeFontBase::FontAttrUnicode_t GetGlsUnicodeFontBaseFontAttributes | ( |  | ) |

Get the GlsUnicodeFontBase::FontAttrUnicode_t associated with the unicode font

Returns
  the GlsFontBase::FontAttrUnicode_t associated with the unicode font

## ◆ GetGlsUnicodeFontBaseTextures()

std::vector< Image * > GetGlsUnicodeFontBaseTextures | ( |  | ) |

Get the textures associated with the unicode font

Returns
  the textures associated with the unicode font

Note
  each texture will have its usage count increased by one so caller should call DeleteUsage on each texture when they are no longer needed

## ◆ InitializeFromDBUF()

void InitializeFromDBUF | ( | const unsigned char *const | dbufData,
|  | const unsigned int | dbufDataLength
| ) |  |
| protected

initialize the reader from the given DBUF data

Parameters

  dbufData | DBUF data to read
  dbufDataLength | number of bytes of data in dbufData

## ◆ IsValid()

bool IsValid | ( |  | ) | const

Determine if a valid DBUF was read

Returns
  true if a valid DBUF was read else false

## Member Data Documentation

## ◆ _charAttrUnicode

GlsUnicodeFontBase::AttrContUnicode_t _charAttrUnicode
| protected

unicode char attributes read from DBUF data

## ◆ _errMsg

std::string _errMsg
| protected

error message if !IsValid()

## ◆ _fontAttrUnicode

GlsUnicodeFontBase::FontAttrUnicode_t _fontAttrUnicode
| protected

unicode font attributes read from DBUF data

## ◆ _fontTextures

std::vector<Image*> _fontTextures
| protected

font textures read from DBUF data

## ◆ _isValid

bool _isValid
| protected

true if a valid DBUF was read else false

The documentation for this class was generated from the following file:

- gls_unicode_font_base.h