partially done work on total source tree rework, separation of engine context and game context, generalization of renderer for different backends as well as web platform target
This commit is contained in:
26
src/rendering/twn_text_c.h
Normal file
26
src/rendering/twn_text_c.h
Normal file
@ -0,0 +1,26 @@
|
||||
#include "twn_rendering_platform.h"
|
||||
|
||||
#include <stb_truetype.h>
|
||||
|
||||
|
||||
#define ASCII_START 32
|
||||
#define ASCII_END 128
|
||||
#define NUM_DISPLAY_ASCII ((ASCII_END - ASCII_START) + 1)
|
||||
|
||||
|
||||
struct font_data {
|
||||
stbtt_packedchar char_data[NUM_DISPLAY_ASCII];
|
||||
stbtt_fontinfo info;
|
||||
|
||||
const char *file_path;
|
||||
unsigned char *file_bytes;
|
||||
size_t file_bytes_len;
|
||||
|
||||
gpu_texture texture;
|
||||
|
||||
int height_px;
|
||||
float scale_factor;
|
||||
int ascent;
|
||||
int descent;
|
||||
int line_gap;
|
||||
};
|
Reference in New Issue
Block a user