Merge branch 'master' into jgrpp

This commit is contained in:
Jonathan G Rennison
2023-07-04 00:18:25 +01:00
8 changed files with 9 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
#include "../core/math_func.hpp"
#include "../zoom_func.h"
#include "../fileio_func.h"
#include "../string_func.h"
#include "truetypefontcache.h"
#include "../table/control_codes.h"
@@ -41,7 +42,7 @@ public:
~FreeTypeFontCache();
void ClearFontCache() override;
GlyphID MapCharToGlyph(WChar key) override;
const char *GetFontName() override { return face->family_name; }
std::string GetFontName() override { return stdstr_fmt("%s, %s", face->family_name, face->style_name); }
bool IsBuiltInFont() override { return false; }
const void *GetOSHandle() override { return &face; }
};

View File

@@ -31,7 +31,7 @@ public:
virtual bool GetDrawGlyphShadow();
virtual GlyphID MapCharToGlyph(WChar key) { assert(IsPrintable(key)); return SPRITE_GLYPH | key; }
virtual const void *GetFontTable(uint32 tag, size_t &length) { length = 0; return nullptr; }
virtual const char *GetFontName() { return "sprite"; }
virtual std::string GetFontName() { return "sprite"; }
virtual bool IsBuiltInFont() { return true; }
};