71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
74 struct cFontCharDescriptor
77 int m_width, m_height;
78 int m_xOffset, m_yOffset;
82 double m_tu0, m_tu1, m_tu2, m_tu3;
83 double m_tv0, m_tv1, m_tv2, m_tv3;
84 double m_px0, m_px1, m_px2, m_px3;
85 double m_py0, m_py1, m_py2, m_py3;
109 unsigned int m_lineHeight;
111 unsigned int m_width, m_height;
112 unsigned int m_pages;
113 std::string m_fileName;
115 cFontCharDescriptor m_chars[256];
130 for (
int i=0; i<256; i++)
131 m_chars[i].initialize();
138 #endif // DOXYGEN_SHOULD_SKIP_THIS
209 const double a_fontScale,
233 void parseFont(std::istream& a_stream, cFontCharset& a_charsetDesc);
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
double getPointSize() const
This method returns the current font size.
Definition: CFont.h:194
bool loadFromFile(const std::string &a_filename)
This method loads a font file by passing a path and file name as argument.
Definition: CFont.cpp:102
std::string m_filename
Current font filename loaded into memory.
Definition: CFont.h:246
This class implements support for 2D fonts.
Definition: CFont.h:159
cFont()
Constructor of cFont.
Definition: CFont.cpp:61
Implements option settings for CHAI3D.
std::string getFilename() const
This method returns the filename from which this font was last loaded or saved.
Definition: CFont.h:184
void cleanup()
This method cleans all memory.
Definition: CFont.cpp:87
virtual ~cFont()
Destructor of cFont.
Definition: CFont.cpp:76
This class defines a color using a GLfloat representation for each component.
Definition: CColor.h:138
Definition: CAudioBuffer.cpp:56
cFontCharset m_charset
Information about each character in the set.
Definition: CFont.h:223
double getTextWidth(const std::string &a_text)
This method returns the width of a particular string using this font.
Definition: CFont.cpp:358
This class implements a 2D texture map.
Definition: CTexture2d.h:84
double renderText(const std::string &a_text, const cColorf &a_color, const double a_fontScale, cRenderOptions &a_options)
This method render a single string of text.
Definition: CFont.cpp:267
void parseFont(std::istream &a_stream, cFontCharset &a_charsetDesc)
This method parses a font file.
Definition: CFont.cpp:175
cTexture2d * m_texture
Texture image containing the full bitmap representation of the font.
Definition: CFont.h:220