31 #include "CEGUI/Base.h"
32 #include "CEGUI/PropertySet.h"
33 #include "CEGUI/EventSet.h"
34 #include "CEGUI/String.h"
35 #include "CEGUI/XMLSerializer.h"
36 #include "CEGUI/FontGlyph.h"
41 # pragma warning(push)
42 # pragma warning(disable : 4251)
81 const String& getName()
const;
84 const String& getTypeName()
const;
87 const String& getFileName()
const;
100 bool isCodepointAvailable(utf32 cp)
const
101 {
return (d_cp_map.find(cp) != d_cp_map.end()); }
144 const ColourRect& colours,
const float space_extra = 0.0f,
145 const float x_scale = 1.0f,
const float y_scale = 1.0f)
const;
154 void setNativeResolution(
const Sizef& size);
164 const Sizef& getNativeResolution()
const;
193 virtual void notifyDisplaySizeChanged(
const Sizef& size);
207 float getLineSpacing(
float y_scale = 1.0f)
const
208 {
return d_height * y_scale; }
222 float getFontHeight(
float y_scale = 1.0f)
const
223 {
return (d_ascender - d_descender) * y_scale; }
237 float getBaseline(
float y_scale = 1.0f)
const
238 {
return d_ascender * y_scale; }
271 float getTextExtent(
const String& text,
float x_scale = 1.0f)
const;
301 float getTextAdvance(
const String& text,
float x_scale = 1.0f)
const;
326 size_t getCharAtPixel(
const String& text,
float pixel,
327 float x_scale = 1.0f)
const
358 size_t getCharAtPixel(
const String& text,
size_t start_char,
float pixel,
359 float x_scale = 1.0f)
const;
371 static void setDefaultResourceGroup(
const String& resourceGroup)
372 { d_defaultResourceGroup = resourceGroup; }
382 static const String& getDefaultResourceGroup()
383 {
return d_defaultResourceGroup; }
409 const FontGlyph* getGlyphData(utf32 codepoint)
const;
415 const Sizef& native_res);
431 virtual void rasterise(utf32 start_codepoint, utf32 end_codepoint)
const;
434 virtual void updateFont() = 0;
437 virtual void writeXMLToStream_impl(
XMLSerializer& xml_stream)
const = 0;
440 void addFontProperties();
450 void setMaxCodepoint(utf32 codepoint);
453 virtual const FontGlyph* findFontGlyph(
const utf32 codepoint)
const;
501 typedef std::map<utf32, FontGlyph, std::less<utf32>
511 #if defined(_MSC_VER)
512 # pragma warning(pop)
516 #endif // end of guard _CEGUIFont_h_