diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2005-12-06 13:27:15 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2005-12-06 13:27:15 +0000 |
commit | b0fee17d6e1a463dcd84568e5997663b69488998 (patch) | |
tree | fffce775c4d1636a8bbc9e97669aa99b9378fc15 /firmware/export/font.h | |
parent | 01917ec9809f1abff87cb372b700fc09476d343e (diff) | |
download | rockbox-b0fee17d6e1a463dcd84568e5997663b69488998.tar.gz rockbox-b0fee17d6e1a463dcd84568e5997663b69488998.zip |
waiting is over: initial unicode commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/font.h')
-rw-r--r-- | firmware/export/font.h | 13 |
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); | |||
96 | struct font* font_get(int font); | 103 | struct font* font_get(int font); |
97 | void font_reset(void); | 104 | void font_reset(void); |
98 | int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber); | 105 | int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber); |
106 | int font_get_width(struct font* ft, unsigned short ch); | ||
107 | const unsigned char * font_get_bits(struct font* ft, unsigned short ch); | ||
108 | void glyph_cache_save(void); | ||
109 | void glyph_cache_load(void); | ||
99 | 110 | ||
100 | #else /* HAVE_LCD_BITMAP */ | 111 | #else /* HAVE_LCD_BITMAP */ |
101 | 112 | ||