RtB/src/Font.hpp

22 lines
718 B
C++

/* ================================================================
Font
----------------
Font.cpp/Font.hpp provide the Font class. This class is similar to Mesh/Texture
================================================================ */
#ifndef FONT_HPP
#define FONT_HPP
#include "SDL_ttf.h"
#include <string>
class Font {
public:
Font(std::string name_, int ptsize, const char *buffer, size_t buffer_size);
~Font();
TTF_Font *font; // Might as well give public access
void setSize(int pt);
private:
SDL_RWops *rwops; // Our RWops structure that points to passed buffer
std::string name; // The identifier name
int point_size; // The font size, in points
};
#endif