From dcc15a8103452ffc05e40979cdf6957175bd047c Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 4 Aug 2023 00:21:24 +1000 Subject: Add new smooth Hobo font --- source/core/StarFont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/core') diff --git a/source/core/StarFont.cpp b/source/core/StarFont.cpp index 2c0d6a7..8b531a0 100644 --- a/source/core/StarFont.cpp +++ b/source/core/StarFont.cpp @@ -79,7 +79,7 @@ unsigned Font::width(String::Char c) { return *width; } else { FT_Load_Char(m_fontImpl->face, c, FontLoadFlags); - unsigned newWidth = (m_fontImpl->face->glyph->advance.x + 32) / 64; + unsigned newWidth = (m_fontImpl->face->glyph->linearHoriAdvance + 32768) / 65536; m_widthCache.insert({c, m_pixelSize}, newWidth); return newWidth; } -- cgit v1.2.3