void init();
void glyph(unsigned);
void kerning(unsigned, unsigned, float);
+ void ligature(unsigned, unsigned, unsigned);
void texture();
void texture_ref(const std::string &);
};
private:
typedef std::map<unsigned, Glyph> GlyphMap;
- typedef std::pair<unsigned, unsigned> KerningKey;
- typedef std::map<KerningKey, float> KerningMap;
+ 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 x_height;
GlyphMap glyphs;
KerningMap kerning;
+ LigatureMap ligatures;
public:
Font();
private:
void create_glyph_quad(const Glyph &, PrimitiveBuilder &) const;
float get_glyph_advance(unsigned, unsigned = 0) const;
+ unsigned get_ligature(unsigned, unsigned) const;
};
} // namespace GL