From ff7593f5e6ee131eefe5d1e793626fe05a9513b1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 17 Nov 2021 11:40:54 +0100 Subject: Readd kerning --- depends/mgl | 2 +- include/mglpp/graphics/Font.hpp | 4 ++-- src/graphics/Font.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/depends/mgl b/depends/mgl index a14eb65..909ee26 160000 --- a/depends/mgl +++ b/depends/mgl @@ -1 +1 @@ -Subproject commit a14eb65e82d226fe8b33ca23d29eeba02066357d +Subproject commit 909ee26e03d6a7f93b83fad9709139565a62629a diff --git a/include/mglpp/graphics/Font.hpp b/include/mglpp/graphics/Font.hpp index 440dabe..ca6a146 100644 --- a/include/mglpp/graphics/Font.hpp +++ b/include/mglpp/graphics/Font.hpp @@ -16,7 +16,7 @@ namespace mgl { vec2i size; vec2i texture_position; /* In pixel space */ vec2i texture_size; /* In pixel space */ - int advance = 0; + float advance = 0.0f; }; class Font { @@ -28,7 +28,7 @@ namespace mgl { unsigned int get_character_size() const; // Returns 0 sized glyph if the font doesn't have the codepoint FontGlyph get_glyph(uint32_t codepoint); - int get_kerning(uint32_t prev_codepoint, uint32_t codepoint); + float get_kerning(uint32_t prev_codepoint, uint32_t codepoint); Texture get_texture() const; mgl_font* internal_font(); diff --git a/src/graphics/Font.cpp b/src/graphics/Font.cpp index b3ef54c..535daae 100644 --- a/src/graphics/Font.cpp +++ b/src/graphics/Font.cpp @@ -28,7 +28,7 @@ namespace mgl { return font_glyph; } - int Font::get_kerning(uint32_t prev_codepoint, uint32_t codepoint) { + float Font::get_kerning(uint32_t prev_codepoint, uint32_t codepoint) { return mgl_font_get_kerning(&font, prev_codepoint, codepoint); } -- cgit v1.2.3