+ struct Glyph
+ {
+ class Loader: public Msp::DataFile::ObjectLoader<Glyph>
+ {
+ public:
+ Loader(Glyph &);
+ private:
+ void texcoords(float, float, float, float);
+ };
+
+ unsigned code;
+ float x1, y1;
+ float x2, y2;
+ float w, h;
+ float off_x, off_y;
+ float advance;
+
+ Glyph();
+ };
+
+private:
+ typedef std::map<unsigned, Glyph> GlyphMap;
+ typedef std::pair<unsigned, unsigned> CodePair;
+ typedef std::map<CodePair, float> KerningMap;
+ typedef std::map<CodePair, unsigned> LigatureMap;
+
+ RefPtr<const Texture2D> texture;
+ float native_size;
+ float ascent;
+ float descent;
+ float cap_height;
+ float x_height;
+ GlyphMap glyphs;
+ KerningMap kerning;
+ LigatureMap ligatures;
+
+public: