44#include <FTGL/FTFont.h>
A class for encapsulatiing a particular instance of an FTFont (pointer) Each FTFont is characterised ...
EMFTGLFontInstance(EMFTGL::FontMode mode, const string &file_name, const unsigned int face_size, const unsigned int d, const bool use_dl)
Constructor - must supply the 5 important parameters.
EMFTGL::FontMode font_mode
Disallow copy construction.
FTFont * get_font()
Get the pointer to the font.
bool params_match(EMFTGL::FontMode mode, const string &file_name, const unsigned int face_size, const unsigned int depth, const bool use_dl)
Checks to see if the argument params match the internally stored equivalents.
A class for managing multiple instances of EMFTGLFontInstances, in particular for caching them,...
vector< EMFTGLFontInstance * > font_instances
Disallow copy construction.
FTFont * get_font(EMFTGL::FontMode mode, const string &file_name, const unsigned int face_size, const unsigned int d, const bool use_dl)
Get a font with the associated parameters.
EMFTGL is an interface for rendering fonts in EMAN2 using FTGL.
void set_using_display_lists(const bool b)
Set whether or not the font render should be using display lists.
bool get_using_display_lists()
Get whether or not font renderer is currently using display lists.
void set_depth(const unsigned int d)
Set the depth of the rendered text - only useful if this->mode = EXTRUDE.
string font_file_name
Disallow copy construction.
vector< float > bounding_box(const string &message)
Obtains the bounding box of the given message, as would be rendered using the current state variables...
FontMode get_font_mode()
Get the current font mode.
FontMode
FontModes correspond to the different FTFont types - this correspondence is EXTRUDE - FTGLExtrdFont,...
void render_string(const string &message)
Render string performs OpenGL rendering of the string using the current state variables of this class...
void set_font_file_name(const string &file_name)
Set the font file name - should be a .ttf file.
unsigned int get_face_size()
Get the currently used face size.
EMFTGL()
Constructor is OS dependent - it attempts to reference an Operating System specific fonts file by def...
void set_face_size(const unsigned int size)
Set the face size of the rendered text.
string get_font_file_name()
Get the name of the current font file in use.
void set_font_mode(const FontMode m)
Set the font mode.
unsigned int get_depth()
Get the currently used depth.