28 #ifndef HPL_FONTDATA_H 29 #define HPL_FONTDATA_H 31 #include "common/array.h" 32 #include "common/ptr.h" 33 #include "hpl1/engine/graphics/GraphicsTypes.h" 34 #include "hpl1/engine/math/MathTypes.h" 35 #include "hpl1/engine/resources/ResourceBase.h" 36 #include "hpl1/engine/resources/low_level_resources.h" 37 #include "hpl1/engine/system/SystemTypes.h" 44 class iLowLevelGraphics;
45 class cGraphicsDrawer;
54 const cVector2f &avSize,
float afAdvance);
72 bool createFromFontFile(
const tString &asFileName,
int alSize,
unsigned short alFirstChar,
73 unsigned short alLastChar);
75 bool createFromBitmapFile(
const tString &asFileName);
86 _graphicsDrawer = apGraphicsDrawer;
87 _lowLevelResources = apLowLevelResources;
98 inline unsigned short getFirstChar() {
return _firstChar; }
99 inline unsigned short getLastChar() {
return _lastChar; }
101 inline const cVector2f &getSizeRatio()
const {
return _sizeRatio; }
126 eFontAlign aAlign,
const tWString &asString);
128 void getWordWrapRows(
float afLength,
float afFontHeight,
cVector2f avSize,
const tWString &asString,
143 float getLength(
const cVector2f &avSize,
const char32_t *sText);
154 unsigned short _firstChar;
155 unsigned short _lastChar;
160 const cVector2l &avFontSize,
int alAdvance);
161 void addGlyph(
Glyph *apGlyph);
168 #endif // HPL_FONTDATA_H
Definition: GuiGfxElement.h:72
void unload()
Definition: font_data.h:78
Definition: ResourceBase.h:36
void destroy()
Definition: font_data.h:79
Definition: bitmap2D.h:42
Definition: font_data.h:67
T * iterator
Definition: array.h:54
void setUp(cGraphicsDrawer *apGraphicsDrawer, LowLevelResources *apLowLevelResources, cGui *apGui)
Definition: font_data.h:84
bool reload()
Definition: font_data.h:77
Definition: GraphicsDrawer.h:77
Definition: low_level_resources.h:40
Definition: GfxObject.h:38
Definition: font_data.h:51
Definition: tinyxml.h:864
Definition: LowLevelGraphics.h:200
Glyph * getGlyph(int alNum) const
Definition: font_data.h:96
float getHeight() const
Definition: font_data.h:135