Mercurial > molko
comparison src/libmlk-core/core/font.h @ 339:979960e65f76
js: add font bindings
While here, correct int to long in font_render.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 16 Oct 2021 09:01:20 +0200 |
parents | 8f9937403749 |
children | 19782ea1cf4a |
comparison
equal
deleted
inserted
replaced
338:94828af916bb | 339:979960e65f76 |
---|---|
22 #include <stddef.h> | 22 #include <stddef.h> |
23 | 23 |
24 #include "core.h" | 24 #include "core.h" |
25 | 25 |
26 struct texture; | 26 struct texture; |
27 struct vfs_file; | |
27 | 28 |
28 enum font_style { | 29 enum font_style { |
29 FONT_STYLE_ANTIALIASED, | 30 FONT_STYLE_ANTIALIASED, |
30 FONT_STYLE_NONE | 31 FONT_STYLE_NONE, |
32 FONT_STYLE_LAST | |
31 }; | 33 }; |
32 | 34 |
33 struct font { | 35 struct font { |
34 enum font_style style; | 36 enum font_style style; |
35 void *handle; | 37 void *handle; |
42 | 44 |
43 int | 45 int |
44 font_openmem(struct font *, const void *, size_t, unsigned int); | 46 font_openmem(struct font *, const void *, size_t, unsigned int); |
45 | 47 |
46 int | 48 int |
49 font_openvfs(struct font *, struct vfs_file *, unsigned int); | |
50 | |
51 int | |
47 font_ok(const struct font *); | 52 font_ok(const struct font *); |
48 | 53 |
49 int | 54 int |
50 font_render(struct font *, struct texture *, const char *, unsigned int); | 55 font_render(struct font *, struct texture *, const char *, unsigned long); |
51 | 56 |
52 unsigned int | 57 unsigned int |
53 font_height(const struct font *); | 58 font_height(const struct font *); |
54 | 59 |
55 int | 60 int |