summaryrefslogtreecommitdiff
path: root/src/user/include/libfont/fonts.h
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
committerBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
commitbce944d1498eaa3b6940ee234c863b3548a66b37 (patch)
treeea40c087ab4f0f236aee8d158cf68550f5209f72 /src/user/include/libfont/fonts.h
parentca731aa747214919df7b3dfe3478dbe787ce5b68 (diff)
downloadportland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz
graphics!
Diffstat (limited to 'src/user/include/libfont/fonts.h')
-rw-r--r--src/user/include/libfont/fonts.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/user/include/libfont/fonts.h b/src/user/include/libfont/fonts.h
new file mode 100644
index 0000000..b66659f
--- /dev/null
+++ b/src/user/include/libfont/fonts.h
@@ -0,0 +1,21 @@
+#ifndef LIBFONT_FONTS_H
+#define LIBFONT_FONTS_H
+
+#include <stdbool.h>
+#include <stdint.h>
+
+struct font_info {
+ uint32_t space_width;
+ uint32_t space_height;
+ uint32_t char_width;
+ uint32_t char_height;
+ bool *bitmaps[256];//left to right then top to bottom
+ //null pointer for unsupported character
+ //unsupported characters drawn as bitmaps[0]
+};
+
+struct font_info *get_font(const char *name);
+
+void put_char(const struct font_info *font, char ch, uint8_t *pb_ptr, uint32_t pb_pitch, uint8_t bg, uint8_t fg);
+
+#endif \ No newline at end of file