+
+ void loadFontFile(const std::string &filename);
+ void loadFontSurface(const std::string &glyphimage,
+ const std::string &shadowimage,
+ const std::vector<std::string> &chars,
+ GlyphWidth glyph_width,
+ int char_width);
+private:
+ struct Glyph {
+ /** How many pixels should the cursor advance after printing the
+ glyph */
+ float advance;
+
+ /** Offset that is used when drawing the glyph */
+ Vector offset;
+
+ /** index of containing surface */
+ int surface_idx;
+
+ /** Position of the glyph inside the surface */
+ Rect rect;
+
+ Glyph() :
+ advance(),
+ offset(),
+ surface_idx(),
+ rect()
+ {}
+ };
+
+private:
+ GlyphWidth glyph_width;
+
+ std::vector<Surface> glyph_surfaces;
+ std::vector<Surface> shadow_surfaces;
+ int char_height;