diff --git a/src/client/font.c b/src/client/font.c index cd4d0d2..8cc621d 100644 --- a/src/client/font.c +++ b/src/client/font.c @@ -1,6 +1,8 @@ #define STB_TRUETYPE_IMPLEMENTATION #include #include +#include +#include #include "client/client.h" #include "client/font.h" #include "client/opengl.h" @@ -29,6 +31,10 @@ static VertexLayout font_vertex_layout = { void font_init() { unsigned char *ttf = (unsigned char *) read_file(ASSET_PATH "fonts/Minecraftia.ttf"); + if (!ttf) { + fprintf(stderr, "[error] could not load Minecraftia.ttf\n"); + abort(); + } unsigned char font_atlas_data[font_atlas_size*font_atlas_size]; stbtt_BakeFontBitmap(ttf, 0, 24.0, font_atlas_data,