]> git.tdb.fi Git - libs/gl.git/blobdiff - source/font.h
Add ascent and descent to Font
[libs/gl.git] / source / font.h
index ebaa8e7a7f43f469b7ae1ae246db6d92ad860bde..609f272316433866580b1797941fe95b69e05865 100644 (file)
@@ -31,6 +31,8 @@ public:
        void  set_texture(const Texture2D &);
        void  add_glyph(wchar_t, float, float, float, float, float, float, float, float, float);
        float get_default_size() const { return default_size; }
+       float get_ascent() const { return ascent; }
+       float get_descent() const { return descent; }
        float get_string_width(const std::string &) const;
        float get_string_width(const std::wstring &) const;
        void  draw_glyph(wchar_t);
@@ -67,6 +69,8 @@ private:
        const Texture2D *tex;
        bool     own_tex;
        float    default_size;
+       float    ascent;
+       float    descent;
        GlyphMap glyphs;
        VertexArray varray;