14 #ifndef FONT_HPP_INCLUDED
15 #define FONT_HPP_INCLUDED
74 return (SIZE_NORMAL * size / 14);
82 int x,
int y,
bool use_tooltips,
int style);
103 int style = TTF_STYLE_NORMAL);
const SDL_Color BIGMAP_COLOR
const SDL_Color BUTTON_COLOR
family_class
Font classes for get_font_families().
const SDL_Color TITLE_COLOR
const SDL_Color PETRIFIED_COLOR
const SDL_Color BLACK_COLOR
int relative_size(int size)
SDL_Rect line_size(const std::string &line, int font_size, int style)
Determine the size of a line of text given a certain font size.
GLint GLint GLint GLint GLint GLint y
const SDL_Color NORMAL_COLOR
const SDL_Color GOOD_COLOR
const SDL_Color DISABLED_COLOR
const t_string & get_font_families(family_class fclass)
Returns the currently defined fonts.
const SDL_Color BAD_COLOR
int get_max_height(int size)
void update_font_path() const
Updates the font path, when initialized it sets the fontpath to game_config::path.
void init() const
Initializes the font path.
void cache_mode(CACHE mode)
Contains a wrapper class for the GPU_Image class.
const SDL_Color LABEL_COLOR
const SDL_Color LOBBY_COLOR
GLint GLint GLint GLint GLint x
void deinit() const
Deinitializes the font path.
std::string make_text_ellipsis(const std::string &text, int font_size, int max_width, int style)
If the text exceeds the specified max width, end it with an ellipsis (...)
SDL_Rect draw_text_line(surface &gui_surface, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips, int style)
Base class for all the errors encountered by the engine.
const SDL_Color GRAY_COLOR
const SDL_Color YELLOW_COLOR
surface get_rendered_text(const std::string &str, int size, const SDL_Color &color, int style)
GLsizei const GLcharARB ** string
int line_width(const std::string &line, int font_size, int style)
Determine the width of a line of text given a certain font size.