diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-27 21:47:41 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-27 21:47:41 +0000 |
commit | e0ac130808d9bed5443115ee91e9cccda713ae3c (patch) | |
tree | dad2b2cbe2bc8bf5560f4859880549472f808671 /ui/font.cpp | |
parent | Remove the static texture cache (diff) | |
parent | Render text in N draw calls (diff) | |
download | ilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.tar.bz2 ilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.tar.xz ilt-e0ac130808d9bed5443115ee91e9cccda713ae3c.zip |
Merge branch 'text2'
Diffstat (limited to 'ui/font.cpp')
-rw-r--r-- | ui/font.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/font.cpp b/ui/font.cpp index 305e0f3..b6669b0 100644 --- a/ui/font.cpp +++ b/ui/font.cpp @@ -1,6 +1,5 @@ #include "font.h" #include <algorithm> -#include <cache.h> #include <cctype> #include <ft2build.h> #include FT_FREETYPE_H @@ -60,8 +59,6 @@ using Face = glRef<FT_Face, }, FT_Done_Face>; -Cache<Font, std::filesystem::path, unsigned int> Font::cachedFontRenderings; - Font::Font(std::filesystem::path p, unsigned s) : path {std::move(p)}, size {getTextureSize(s)} { generateChars(BASIC_CHARS); @@ -77,6 +74,7 @@ Font::generateChars(const utf8_string_view chars) const if (charsData.find(codepoint) == charsData.end()) { if (!ft) { ft.emplace(); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); } if (!face) { face.emplace(*ft, path.c_str()); |