#include #include "ubox_vga.h" #include "ubox_text.h" static const uint8_t *font; static uint8_t w, h; void ubox_set_font(const uint8_t *pixdata, uint8_t width, uint8_t height) { font = pixdata; w = width; h = height; } void ubox_put_text(uint16_t x, uint16_t y, const char *text, uint8_t color) { ubox_rect dst = { x, y, w, h}; while (*text) { ubox_blit_c(font + ((*text++ - ' ') * w * h), &dst, color); dst.x += w; } }