diff options
-rw-r--r-- | source/saw/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/saw/main.c b/source/saw/main.c index c614f65..723fa92 100644 --- a/source/saw/main.c +++ b/source/saw/main.c @@ -21,6 +21,8 @@ #include <stdio.h> +#include "font.inl.h" + enum { SAW_CHANNEL_COUNT = 2, SAW_SAMPLE_RATE = 44100, @@ -56,6 +58,8 @@ typedef struct { static struct NVGcontext *saw_nvg; static ma_device saw_ma; +static i32 saw_font = -1; + static i32 saw_mouse_x = 0; static i32 saw_mouse_y = 0; static i8 saw_lbutton_click = 0; @@ -449,6 +453,12 @@ static void saw_init(void) { ma_device_start(&saw_ma); + saw_font = nvgCreateFontMem(saw_nvg, "Black Chancery", saw_font_ttf, + SAW_FONT_TTF_SIZE, 0); + + if (saw_font == -1) + printf("nvgCreateFontMem failed.\n"); + for (i32 i = 0; i < ROLL_COUNT; i++) saw_rolls[i] = (saw_roll_t) { .last_index = -1, .turned_off = { 0 }, |