Added a basic font cache and got some basic text scaling on the go.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef FONTCACHE_H
|
||||
#define FONTCACHE_H
|
||||
|
||||
#include <SDL2/SDL_ttf.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int Capcity;
|
||||
unsigned int Size;
|
||||
char* FontFilePath;
|
||||
TTF_Font** Fonts;
|
||||
} FontCache;
|
||||
|
||||
FontCache* CreateFontCache(char* fontFilePath);
|
||||
TTF_Font* GetFont(unsigned short fontSize, FontCache* cache);
|
||||
void FreeFontCache(FontCache* cache);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user