Put bundled font into its own translation unit
This commit is contained in:
parent
cbdd19e525
commit
4daff93e29
4 changed files with 10 additions and 3 deletions
1
src/bundledfont.cpp
Normal file
1
src/bundledfont.cpp
Normal file
|
@ -0,0 +1 @@
|
|||
#include "../liberation.ttf.xxd"
|
|
@ -31,12 +31,16 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "../liberation.ttf.xxd"
|
||||
|
||||
#include <SDL_ttf.h>
|
||||
|
||||
#define BUNDLED_FONT liberation
|
||||
|
||||
#define BUNDLED_FONT_DECL(FONT) \
|
||||
extern unsigned char assets_##FONT##_ttf[]; \
|
||||
extern unsigned int assets_##FONT##_ttf_len;
|
||||
|
||||
BUNDLED_FONT_DECL(liberation)
|
||||
|
||||
#define BUNDLED_FONT_D(f) assets_## f ##_ttf
|
||||
#define BUNDLED_FONT_L(f) assets_## f ##_ttf_len
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue