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
94 bool loadFromFile(
const std::string& filename);
113 bool loadFromMemory(
const void* data, std::size_t sizeInBytes);
143 const Glyph& getGlyph(Uint32 codePoint,
unsigned int characterSize,
bool bold)
const;
161 int getKerning(Uint32 first, Uint32 second,
unsigned int characterSize)
const;
174 int getLineSpacing(
unsigned int characterSize)
const;
188 const Texture& getTexture(
unsigned int characterSize)
const;
198 Font& operator =(
const Font& right);
208 Row(
unsigned int rowTop,
unsigned int rowHeight) : width(0), top(rowTop), height(rowHeight) {}
218 typedef std::map<Uint32, Glyph> GlyphTable;
230 unsigned int nextRow;
231 std::vector<Row> rows;
250 Glyph loadGlyph(Uint32 codePoint,
unsigned int characterSize,
bool bold)
const;
262 IntRect findGlyphRect(Page& page,
unsigned int width,
unsigned int height)
const;
272 bool setCurrentSize(
unsigned int characterSize)
const;
277 typedef std::map<unsigned int, Page> PageTable;
286 mutable PageTable m_pages;
287 mutable std::vector<Uint8> m_pixelBuffer;
293 #endif // SFML_FONT_HPP