63 std::string
pango_word_wrap(
const std::string& unwrapped_text,
int font_size,
int max_width,
int max_height = -1,
int max_lines = -1,
bool partial_line =
false);
Wrapper class to encapsulate creation and management of an SDL_Texture.
void line(int from_x, int from_y, int to_x, int to_y)
Draw a line.
int pango_line_width(const std::string &line, int font_size, font::pango_text::FONT_STYLE font_style=font::pango_text::STYLE_NORMAL)
Determine the width of a line of text given a certain font size.
std::string pango_line_ellipsize(const std::string &text, int font_size, int max_width, font::pango_text::FONT_STYLE font_style)
If the text exceeds the specified max width, end it with an ellipsis (...)
rect pango_draw_text(bool actually_draw, const rect &area, int size, const color_t &color, const std::string &text, int x, int y, bool use_tooltips, pango_text::FONT_STYLE style)
Draws text on the screen.
std::pair< int, int > pango_line_size(const std::string &line, int font_size, font::pango_text::FONT_STYLE font_style)
Determine the width and height of a line of text given a certain font size.
texture pango_render_text(const std::string &text, int size, const color_t &color, font::pango_text::FONT_STYLE style, bool use_markup, int max_width)
Returns a SDL texture containing the rendered text.
std::string pango_word_wrap(const std::string &unwrapped_text, int font_size, int max_width, int max_height, int max_lines, bool)
Uses Pango to word wrap text.
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
The basic class for representing 8-bit RGB or RGBA colour values.
An abstract description of a rectangle with integer coordinates.