summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/screen/font.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-06-10 02:39:37 +0200
committerUros Majstorovic <majstor@majstor.org>2020-06-10 02:39:37 +0200
commit294d4533489e9ed6b7e71c63a1faa9722a2621c6 (patch)
tree04a3b9be039206e4457ff5632b98a7f793ddc001 /code/fe310/eos/eve/screen/font.c
parentb5aa60b256dd2b328515779883ba365aba3d995f (diff)
page/form refactor; implemented form layout, labels
Diffstat (limited to 'code/fe310/eos/eve/screen/font.c')
-rw-r--r--code/fe310/eos/eve/screen/font.c14
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