game/sdlpp/sdlpp_font.hpp

34 lines
689 B
C++

#ifndef SDLPP_HPP_FONT
#define SDLPP_HPP_FONT
#include "sdlpp_common.hpp"
#include <iostream>
namespace SDLPP {
class SDLPPSCOPE Font {
public:
Font() = delete;
Font( const std::string &font );
Font( const std::string &font, int size );
virtual ~Font();
const TTF_Font *getFont() const;
TTF_Font *getFont();
void setOutline( int size );
int getOutline();
void setStyle( int style );
void setHinting( int hinting );
void changeFontSize( int size );
void revertSize();
private:
void closeFont();
void checkFont();
TTF_Font *font_ptr;
const std::string font_path;
int original_size = -1;
};
} // namespace SDLPP
#endif