diff options
Diffstat (limited to 'src/graphics/font.c')
-rw-r--r-- | src/graphics/font.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/graphics/font.c b/src/graphics/font.c index 1c3631d..17362f6 100644 --- a/src/graphics/font.c +++ b/src/graphics/font.c @@ -228,8 +228,6 @@ int mgl_font_get_glyph(mgl_font *self, uint32_t codepoint, mgl_font_glyph *glyph return res; } -int mgl_font_get_kerning(const mgl_font *self, uint32_t prev_codepoint, uint32_t codepoint) { - return 0; - /* TODO: */ - /*return stbtt_GetCodepointKernAdvance(self->font_info, prev_codepoint, codepoint);*/ +float mgl_font_get_kerning(const mgl_font *self, uint32_t prev_codepoint, uint32_t codepoint) { + return stbtt_GetCodepointKernAdvance(self->font_info, prev_codepoint, codepoint) * stbtt_ScaleForPixelHeight(self->font_info, self->character_size); } |