change font scale based on ui scale, fix brush outline color
This commit is contained in:
@@ -21,9 +21,12 @@ public:
|
||||
int size = 0;
|
||||
stbtt_fontinfo font;
|
||||
Texture2D font_tex;
|
||||
std::string path;
|
||||
std::vector<stbtt_bakedchar> chars;
|
||||
float scale = 1.f;
|
||||
|
||||
bool load(const char* ttf, int sz);
|
||||
bool load(const std::string& ttf, int sz, float scale);
|
||||
void change_scale(float scale);
|
||||
void calc_bounds();
|
||||
};
|
||||
|
||||
@@ -33,9 +36,10 @@ public:
|
||||
static std::map<kFont, Font> m_fonts;
|
||||
static Sampler m_sampler;
|
||||
static void init();
|
||||
static bool load(kFont id, const char* ttf, int sz);
|
||||
static bool load(kFont id, const char* ttf, int sz, float scale);
|
||||
static const Font& get(kFont id);
|
||||
static void invalidate() { m_fonts.clear(); }
|
||||
static void change_scale(float scale);
|
||||
};
|
||||
|
||||
class TextMesh
|
||||
|
||||
Reference in New Issue
Block a user