summaryrefslogtreecommitdiff
path: root/firmware/export/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/font.h')
-rw-r--r--firmware/export/font.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/export/font.h b/firmware/export/font.h
index beb63470bf..ccdb30ff00 100644
--- a/firmware/export/font.h
+++ b/firmware/export/font.h
@@ -31,10 +31,16 @@
31#if LCD_HEIGHT > 64 31#if LCD_HEIGHT > 64
32#define MAX_FONT_SIZE 10000 32#define MAX_FONT_SIZE 10000
33#else 33#else
34#define MAX_FONT_SIZE 4000 34#define MAX_FONT_SIZE 4000
35#endif 35#endif
36#endif 36#endif
37 37
38#ifndef FONT_HEADER_SIZE
39#define FONT_HEADER_SIZE 36
40#endif
41
42#define GLYPH_CACHE_FILE "/.rockbox/.glyphcache"
43
38/* 44/*
39 * Fonts are specified by number, and used for display 45 * Fonts are specified by number, and used for display
40 * of menu information as well as mp3 filename data. 46 * of menu information as well as mp3 filename data.
@@ -88,6 +94,7 @@ struct font {
88 const unsigned short *offset; /* offsets into bitmap data*/ 94 const unsigned short *offset; /* offsets into bitmap data*/
89 const unsigned char *width; /* character widths or NULL if fixed*/ 95 const unsigned char *width; /* character widths or NULL if fixed*/
90 int defaultchar; /* default char (not glyph index)*/ 96 int defaultchar; /* default char (not glyph index)*/
97 long bits_size; /* # bytes of glyph bits*/
91}; 98};
92 99
93/* font routines*/ 100/* font routines*/
@@ -96,6 +103,10 @@ struct font* font_load(const char *path);
96struct font* font_get(int font); 103struct font* font_get(int font);
97void font_reset(void); 104void font_reset(void);
98int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber); 105int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber);
106int font_get_width(struct font* ft, unsigned short ch);
107const unsigned char * font_get_bits(struct font* ft, unsigned short ch);
108void glyph_cache_save(void);
109void glyph_cache_load(void);
99 110
100#else /* HAVE_LCD_BITMAP */ 111#else /* HAVE_LCD_BITMAP */
101 112