31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Glyph.hpp>
33 #include <SFML/Graphics/Texture.hpp>
34 #include <SFML/Graphics/Rect.hpp>
35 #include <SFML/System/Vector2.hpp>
36 #include <SFML/System/String.hpp>
50 class SFML_GRAPHICS_API
Font
109 bool loadFromFile(
const std::string& filename);
130 bool loadFromMemory(
const void* data, std::size_t sizeInBytes);
160 const Info& getInfo()
const;
176 const Glyph& getGlyph(Uint32 codePoint,
unsigned int characterSize,
bool bold)
const;
194 float getKerning(Uint32 first, Uint32 second,
unsigned int characterSize)
const;
207 float getLineSpacing(
unsigned int characterSize)
const;
222 float getUnderlinePosition(
unsigned int characterSize)
const;
236 float getUnderlineThickness(
unsigned int characterSize)
const;
250 const Texture& getTexture(
unsigned int characterSize)
const;
260 Font& operator =(
const Font& right);
270 Row(
unsigned int rowTop,
unsigned int rowHeight) : width(0), top(rowTop), height(rowHeight) {}
280 typedef std::map<Uint32, Glyph> GlyphTable;
292 unsigned int nextRow;
293 std::vector<Row> rows;
312 Glyph loadGlyph(Uint32 codePoint,
unsigned int characterSize,
bool bold)
const;
324 IntRect findGlyphRect(Page& page,
unsigned int width,
unsigned int height)
const;
334 bool setCurrentSize(
unsigned int characterSize)
const;
339 typedef std::map<unsigned int, Page> PageTable;
349 mutable PageTable m_pages;
350 mutable std::vector<Uint8> m_pixelBuffer;
351 #ifdef SFML_SYSTEM_ANDROID
359 #endif // SFML_FONT_HPP