diff options
Diffstat (limited to 'code/fe310/eos/eve/screen/font.c')
-rw-r--r-- | code/fe310/eos/eve/screen/font.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/code/fe310/eos/eve/screen/font.c b/code/fe310/eos/eve/screen/font.c index b5b7b74..26e7cf0 100644 --- a/code/fe310/eos/eve/screen/font.c +++ b/code/fe310/eos/eve/screen/font.c @@ -6,3 +6,17 @@ void eve_font_init(EVEFont *font, uint8_t font_id) { font->id = font_id; } + +uint16_t eve_font_string_width(EVEFont *font, char *s) { + uint16_t r = 0; + + while (*s) { + r += font->w[*s]; + s++; + } + return r; +} + +uint8_t eve_font_height(EVEFont *font) { + return font->h; +}
\ No newline at end of file |