40 #ifndef _FONTMANAGER_H_ 41 #define _FONTMANAGER_H_ 48 #include "../../Text/TextTools.h" 58 template<
class CodeType>
83 virtual std::vector<CodeType>
getCodes()
const = 0;
88 virtual std::vector<Font>
getFonts()
const = 0;
98 template<
class CodeType>
112 for (
unsigned int i = 0; i <
fonts_.size(); i++)
119 throw Exception(
"AbstractFontManager::getCode. Unknown font: " + font.toString());
124 for (
unsigned int i = 0; i <
codes_.size(); i++)
148 #endif //_FONTMANAGER_H_ std::vector< Font > getFonts() const
const Font & getFont(int &code) const
Data structure for fonts.
This class allows to perform a correspondence analysis.
void registerFont_(const Font &font, int code)
virtual const Font & getFont(CodeType &code) const =0
virtual std::vector< CodeType > getCodes() const =0
size_t getNumberOfFonts() const
static std::string toString(T t)
General template method to convert to a string.
virtual size_t getNumberOfFonts() const =0
std::vector< CodeType > codes_
virtual std::vector< Font > getFonts() const =0
CodeType getCode(const Font &font) const
Associate special fonts to a code.
virtual CodeType getCode(const Font &font) const =0
std::vector< CodeType > getCodes() const
std::vector< Font > fonts_