1.1 --- a/lib/font.c Tue Nov 13 00:34:10 2018 +0100
1.2 +++ b/lib/font.c Tue Nov 13 12:57:52 2018 +0100
1.3 @@ -32,19 +32,6 @@
1.4
1.5
1.6
1.7 -/* Initialise a font configuration. */
1.8 -
1.9 -void init_font(font_config_t *cfg, uint8_t *chars, uint32_t *table,
1.10 - uint32_t base, uint32_t limit)
1.11 -{
1.12 - cfg->chars = (char_definition_t *) chars;
1.13 - cfg->table = table;
1.14 - cfg->base = base;
1.15 - cfg->limit = limit;
1.16 -}
1.17 -
1.18 -
1.19 -
1.20 /* Return the character definition for the given character. */
1.21
1.22 char_definition_t *get_char_definition(font_config_t *fcfg, char c)
1.23 @@ -52,8 +39,8 @@
1.24 /* Obtain the offset from the table and combine it with the character
1.25 definitions base address. */
1.26
1.27 - if ((c >= fcfg->base) && (c < fcfg->limit))
1.28 - return (char_definition_t *) ((uint8_t *) fcfg->chars + fcfg->table[c - fcfg->base]);
1.29 + if ((c >= fcfg->range->base) && (c < fcfg->range->limit))
1.30 + return (char_definition_t *) ((uint8_t *) fcfg->chars + fcfg->range->table[c - fcfg->range->base]);
1.31 else
1.32 return &space;
1.33 }