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

summaryrefslogtreecommitdiff
path: root/source/core/StarFont.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-03 14:21:51 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-03 14:21:51 +1000
commitd018957b098f00536d0d7641e13aaf1ebddf2238 (patch)
tree0a739eb78c402dd261e06381f77c822c607922ad /source/core/StarFont.hpp
parent069d61e487947a8be38f6a3db52695db94fd306e (diff)
Fix font glyph generation to work correctly with other fonts
Diffstat (limited to 'source/core/StarFont.hpp')
-rw-r--r--source/core/StarFont.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/core/StarFont.hpp b/source/core/StarFont.hpp
index 954f27a..d353611 100644
--- a/source/core/StarFont.hpp
+++ b/source/core/StarFont.hpp
@@ -34,12 +34,13 @@ public:
// May return empty image on unrenderable character (Normally, this will
// render a box, but if there is an internal freetype error this may return
// an empty image).
- Image render(String::Char c);
+ std::pair<Image, int> render(String::Char c);
private:
FontImplPtr m_fontImpl;
ByteArrayConstPtr m_fontBuffer;
unsigned m_pixelSize;
+
HashMap<pair<String::Char, unsigned>, unsigned> m_widthCache;
};