summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/font.c7
-rw-r--r--firmware/font.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/firmware/font.c b/firmware/font.c
index 6f5156cc73..2fe43b5fd3 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -114,6 +114,11 @@ static int readstrpad(char *buf, int totlen)
114 return totlen; 114 return totlen;
115} 115}
116 116
117void font_reset(void)
118{
119 memset(&font_ui, 0, sizeof(struct font));
120}
121
117/* read and load font into incore font structure*/ 122/* read and load font into incore font structure*/
118struct font* font_load(char *path) 123struct font* font_load(char *path)
119{ 124{
@@ -132,7 +137,7 @@ struct font* font_load(char *path)
132 return NULL; 137 return NULL;
133 } 138 }
134 139
135 memset(pf, 0, sizeof(struct font)); 140 font_reset();
136 141
137 /* currently, font loading replaces earlier font allocation*/ 142 /* currently, font loading replaces earlier font allocation*/
138 freeptr = (unsigned char *)(((int)mbuf + 3) & ~3); 143 freeptr = (unsigned char *)(((int)mbuf + 3) & ~3);
diff --git a/firmware/font.h b/firmware/font.h
index 44b975bb78..8e0bb9ce90 100644
--- a/firmware/font.h
+++ b/firmware/font.h
@@ -102,6 +102,7 @@ struct font {
102void font_init(void); 102void font_init(void);
103struct font* font_load(char *path); 103struct font* font_load(char *path);
104struct font* font_get(int font); 104struct font* font_get(int font);
105void font_reset(void);
105 106
106#else /* HAVE_LCD_BITMAP */ 107#else /* HAVE_LCD_BITMAP */
107 108