30 lines
532 B
C++
30 lines
532 B
C++
#ifndef __OPENGLPLAYGROUND_FONT_HH__
|
|
#define __OPENGLPLAYGROUND_FONT_HH__
|
|
|
|
#include <string>
|
|
|
|
struct _TTF_Font;
|
|
typedef struct _TTF_Font TTF_Font;
|
|
class Texture2D;
|
|
|
|
class Font {
|
|
public:
|
|
Font(std::string const& filename, unsigned ptsize);
|
|
Font(Font&& move);
|
|
Font(Font const& copy) = delete;
|
|
|
|
Font& operator=(Font&& move);
|
|
Font& operator=(Font const& copy) = delete;
|
|
|
|
~Font();
|
|
|
|
Texture2D render(std::string const& text, bool fast = false) const;
|
|
|
|
TTF_Font* getFont() const;
|
|
private:
|
|
TTF_Font* font_;
|
|
};
|
|
|
|
|
|
#endif
|