- float get_string_width(const std::string &) const;
- float get_string_width(const std::wstring &) const;
- void draw_glyph(wchar_t);
- void draw_string(const std::string &) const;
- void draw_string(const std::wstring &) const;
- void draw_multiline(const std::string &) const;
- ~Font();
+ float get_ascent() const { return ascent; }
+ float get_descent() const { return descent; }
+ float get_string_width(const std::string &, Codecs::Decoder &) const;
+ void draw_glyph(unsigned);
+ void draw_string(const std::string &, Codecs::Decoder &) const;
+ void draw_string(const std::string &, Codecs::Decoder &, PrimitiveBuilder &) const;
+
+ template<class C>
+ float get_string_width(const std::string &str) const
+ {
+ typename C::Decoder dec;
+ return get_string_width(str, dec);
+ }
+
+ float get_string_width(const std::string &str) const
+ { return get_string_width<Codecs::Utf8>(str); }
+
+ template<class C>
+ void draw_string(const std::string &str) const
+ {
+ typename C::Decoder dec;
+ draw_string(str, dec);
+ }
+
+ void draw_string(const std::string &str) const
+ { draw_string<Codecs::Utf8>(str); }
+
+ template<class C>
+ void draw_string(const std::string &str, PrimitiveBuilder &pb) const
+ {
+ typename C::Decoder dec;
+ draw_string(str, dec, pb);
+ }
+
+ void draw_string(const std::string &str, PrimitiveBuilder &pb) const
+ { return draw_string<Codecs::Utf8>(str, pb); }
+