Put bundled font into its own translation unit

This commit is contained in:
Jonas Kulla 2014-08-16 23:20:33 +02:00
parent cbdd19e525
commit 4daff93e29
4 changed files with 10 additions and 3 deletions

1
src/bundledfont.cpp Normal file
View file

@ -0,0 +1 @@
#include "../liberation.ttf.xxd"

View file

@ -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