30 #include "CEGUI/Base.h"
31 #include "CEGUI/PropertySet.h"
32 #include "CEGUI/EventSet.h"
33 #include "CEGUI/String.h"
34 #include "CEGUI/XMLSerializer.h"
35 #include "CEGUI/FontGlyph.h"
40 # pragma warning(push)
41 # pragma warning(disable : 4251)
80 const String& getName()
const;
83 const String& getTypeName()
const;
86 const String& getFileName()
const;
99 bool isCodepointAvailable(utf32 cp)
const
100 {
return (d_cp_map.find(cp) != d_cp_map.end()); }
143 const ColourRect& colours,
const float space_extra = 0.0f,
144 const float x_scale = 1.0f,
const float y_scale = 1.0f)
const;
153 void setNativeResolution(
const Sizef& size);
163 const Sizef& getNativeResolution()
const;
192 virtual void notifyDisplaySizeChanged(
const Sizef& size);
206 float getLineSpacing(
float y_scale = 1.0f)
const
207 {
return d_height * y_scale; }
221 float getFontHeight(
float y_scale = 1.0f)
const
222 {
return (d_ascender - d_descender) * y_scale; }
236 float getBaseline(
float y_scale = 1.0f)
const
237 {
return d_ascender * y_scale; }
270 float getTextExtent(
const String& text,
float x_scale = 1.0f)
const;
300 float getTextAdvance(
const String& text,
float x_scale = 1.0f)
const;
325 size_t getCharAtPixel(
const String& text,
float pixel,
326 float x_scale = 1.0f)
const
357 size_t getCharAtPixel(
const String& text,
size_t start_char,
float pixel,
358 float x_scale = 1.0f)
const;
370 static void setDefaultResourceGroup(
const String& resourceGroup)
371 { d_defaultResourceGroup = resourceGroup; }
381 static const String& getDefaultResourceGroup()
382 {
return d_defaultResourceGroup; }
408 const FontGlyph* getGlyphData(utf32 codepoint)
const;
414 const Sizef& native_res);
430 virtual void rasterise(utf32 start_codepoint, utf32 end_codepoint)
const;
433 virtual void updateFont() = 0;
436 virtual void writeXMLToStream_impl(
XMLSerializer& xml_stream)
const = 0;
439 void addFontProperties();
449 void setMaxCodepoint(utf32 codepoint);
452 virtual const FontGlyph* findFontGlyph(
const utf32 codepoint)
const;
500 typedef std::map<utf32, FontGlyph, std::less<utf32>
510 #if defined(_MSC_VER)
511 # pragma warning(pop)
515 #endif // end of guard _CEGUIFont_h_