20 double text_width(
const std::u32string& text,
const std::string& font_name,
double font_height,
21 unsigned font_flags = 0);
29 double draw_text(Bitmap& bitmap,
double x,
double y, Color c,
const std::u32string& text,
30 const std::string& font_name,
double font_height,
unsigned font_flags = 0);
45 Bitmap
layout_text(
const std::string& text,
const std::string& font_name,
46 double font_height,
double line_spacing = 0,
62 Bitmap
layout_markup(
const std::string& markup,
const std::string& font_name,
63 double font_height,
double line_spacing = 0,
Bitmap layout_text(const std::string &text, const std::string &font_name, double font_height, double line_spacing=0, int width=-1, Alignment align=AL_LEFT, unsigned font_flags=0)
Creates a bitmap that is filled with the formatted text given to the function.
double draw_text(Bitmap &bitmap, double x, double y, Color c, const std::u32string &text, const std::string &font_name, double font_height, unsigned font_flags=0)
Draws a line of unformatted text on a bitmap.
double text_width(const std::u32string &text, const std::string &font_name, double font_height, unsigned font_flags=0)
Returns the width an unformatted line of text would span on a bitmap if it were drawn using draw_text...
std::string default_font_name()
Returns the name of a neutral font that is available on the current platform.
Bitmap layout_markup(const std::string &markup, const std::string &font_name, double font_height, double line_spacing=0, int width=-1, Alignment align=AL_LEFT, unsigned font_flags=0)
Creates a bitmap that is filled with the formatted text given to the function.
Interface of the Color class.
Contains general typedefs and enums related to graphics.