83 const Rect& sprite_rect,
84 const Rect& texture_rect,
155 float background_alpha;
158 mutable bool is_dirty;
189 (
const std::string& text,
float size)
const;
std::map< std::pair< int, int >, float > KerningMap
std::map< int, std::shared_ptr< Glyph > > CharToGlyphMap
A (inclusive) range between two values.
Represents color in gamma (non-linear) space (aka sRGB).
core::KerningMap kernings
CharToGlyphMap char_to_glyph
std::map< std::string, int > private_use_aliases
DrawableFont(const MemoryChunk &font_file)
std::unique_ptr< Texture2d > texture
void draw_background(SpriteBatch *renderer, float alpha, const Rect &where) const
ListOfTextDrawCommands compile_list(const std::string &text, float size) const
void set_text(const std::string &new_text)
DrawableText(DrawableFont *the_font)
void operator=(DrawableText &&)=delete
DrawableText(DrawableText &&other)=delete
void set_size(float new_size)
void operator=(const DrawableText &)=delete
void set_background(bool new_use_background, float new_alpha=0.5f)
void draw(SpriteBatch *renderer, const v2 &p, const Rgb &base_hi_color) const
DrawableText(const DrawableText &other)=delete
void set_alignment(Align new_alignment)
void draw(SpriteBatch *renderer, const v2 &p, const Rgb &base_color, const Rgb &hi_color) const
Glyph(const Rect &sprite, const Rect &texture, int ch, float ad)
void draw(SpriteBatch *renderer, const v2 &start_position, const Rgb &base_color, const Rgb &hi_color)
std::vector< TextDrawCommand > commands
void add(const Texture2d *texture, const Rect &sprite_rect, const Rect &texture_rect, bool hi)
const Texture2d * texture
TextDrawCommand(const Texture2d *texture, const Rect &sprite_rect, const Rect &texture_rect, bool hi)