Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarFont.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-08-04 00:21:24 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-08-04 00:21:24 +1000
commitdcc15a8103452ffc05e40979cdf6957175bd047c (patch)
tree2a6ea424bee90ae9f95a7d31f1e1118bf1b5ff13 /source/core/StarFont.cpp
parent722488a9ab336260f1acbd987130cf7dce2a783f (diff)
Add new smooth Hobo font
Diffstat (limited to 'source/core/StarFont.cpp')
-rw-r--r--source/core/StarFont.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}