aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------depends/mgl0
-rw-r--r--include/mglpp/graphics/Font.hpp3
-rw-r--r--src/graphics/Font.cpp12
3 files changed, 15 insertions, 0 deletions
diff --git a/depends/mgl b/depends/mgl
-Subproject 0e3128798912a46705323d5c6546c2bdf2ade67
+Subproject 08fe64b91e7e43db54628f922f07864a8d8e540
diff --git a/include/mglpp/graphics/Font.hpp b/include/mglpp/graphics/Font.hpp
index afba8d3..7714144 100644
--- a/include/mglpp/graphics/Font.hpp
+++ b/include/mglpp/graphics/Font.hpp
@@ -31,6 +31,9 @@ namespace mgl {
// Returns 0 sized glyph if the font doesn't have the codepoint
FontGlyph get_glyph(uint32_t codepoint);
float get_kerning(uint32_t prev_codepoint, uint32_t codepoint);
+ int get_ascent() const;
+ int get_descent() const;
+ int get_linegap() const;
Texture get_texture() const;
mgl_font* internal_font();
diff --git a/src/graphics/Font.cpp b/src/graphics/Font.cpp
index 2efae40..09ebfd0 100644
--- a/src/graphics/Font.cpp
+++ b/src/graphics/Font.cpp
@@ -34,6 +34,18 @@ namespace mgl {
return mgl_font_get_kerning(&font, prev_codepoint, codepoint);
}
+ int Font::get_ascent() const {
+ return font.ascent;
+ }
+
+ int Font::get_descent() const {
+ return font.descent;
+ }
+
+ int Font::get_linegap() const {
+ return font.linegap;
+ }
+
Texture Font::get_texture() const {
return Texture::reference(font.texture);
}