-
- void draw_text(const std::string& text, const Vector& pos,
- uint32_t drawing_effect = NONE_EFFECT, uint8_t alpha = 255) const;
-
- void draw_chars(Surface* pchars, const std::string& text,
- const Vector& position, uint32_t drawing_effect, uint8_t alpha) const;
-
- Surface* chars;
- Surface* shadow_chars;
- FontType type;
- int w;
- int h;
+
+ void draw_text(Renderer *renderer, const std::string& text, const Vector& pos,
+ DrawingEffect drawing_effect = NO_EFFECT,
+ float alpha = 1.0f) const;
+
+ void draw_chars(Renderer *renderer, Surface* pchars, const std::string& text,
+ const Vector& position, DrawingEffect drawing_effect,
+ float alpha) const;
+
+ /** Convert a Unicode character code to the index of its glyph */
+ int chr2glyph(uint32_t chr) const;
+
+ GlyphWidth glyph_width;
+ Surface* glyph_surface;
+ Surface* shadow_glyph_surface;
+ int char_height;