NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CFtglFontManager Class Reference

Search Toolkit Book for CFtglFontManager

#include <gui/opengl/ftglfontmanager.hpp>

+ Collaboration diagram for CFtglFontManager:

Public Types

enum  EFtglFontType {
  eTextureFont , ePixmapFont , eBitmapFont , eOutlineFont ,
  ePolygonFont , eExtrudedFont
 FTGL can create different types of fonts from files read in using freetype, but the texture fonts are the best quality. More...
typedef map< string, FTFont * > FontList
typedef FontList::const_iterator FontIter

Public Member Functions

 ~CFtglFontManager ()
void Clear ()
 Delete all current fonts. More...
void SetFontPath (const string &p)
 This path will be prepended to filename when calling GetFont It should be set to "ToStdString(CSysPath::GetResourcePath())" which depends on wxWidgets and so can't be called here. More...
string GetFontpath () const
void SetDeviceResolution (unsigned int res)
 Get/set device resolution in pixels per inch (defaults to 72) You can get this value from wxWidgets via: wxGetDisplayPPI();. More...
unsigned int GetDeviceResolution () const
FTFont * GetFont (const char *filename, unsigned int size, EFtglFontType ft=eTextureFont)

Static Public Member Functions

static CFtglFontManagerInstance ()
 Get an instance of the manager so you can retrieve fonts. More...

Private Member Functions

 CFtglFontManager ()
 Hide ctors to make object singleton. More...
 CFtglFontManager (const CFtglFontManager &)
 private and unimplemented More...
CFtglFontManageroperator= (const CFtglFontManager &)

Private Attributes

map< string, tuple< unique_ptr< unsigned char[]>, size_t > > m_BinaryData
 Loaded to memeory font files. More...
FontList fonts
 All the currently loaded fonts. More...
unsigned int m_DeviceResolution
 target device (screen) resolution in pixels per inch (defaults to 72) More...
string m_FontPath
 Directory from which to read font files. More...

Detailed Description

Definition at line 62 of file ftglfontmanager.hpp.

The documentation for this class was generated from the following files:
Modified on Thu Jun 13 17:24:15 2024 by rev. 669887