SayoriOS 0.3.3

ttf_font.h
1 //
2 // Created by ndraey on 27.01.24.
3 //
4
5 #pragma once
6
7 #include "3rdparty/stb_truetype.h"
8
9 typedef struct {
10 unsigned char* data;
11
12 stbtt_fontinfo info;
13
14 int ascent, descent, linegap;
15
16 int user_size;
17 } ttf_font_t;
18
19 void ttf_init(ttf_font_t* font, const char* path);
20 void ttf_draw_char(ttf_font_t *font, char *buffer, int bwidth, int bheight, int sx, int sy, int character);
21 void ttf_draw_string(ttf_font_t* font, char* buffer, int bwidth, int bheight, int sx, int sy, const char* string);
22 void ttf_destroy(ttf_font_t* font);
stbtt_fontinfo
Definition: stb_truetype.h:715
ttf_font_t
Definition: ttf_font.h:9