From b0fee17d6e1a463dcd84568e5997663b69488998 Mon Sep 17 00:00:00 2001 From: Marcoen Hirschberg Date: Tue, 6 Dec 2005 13:27:15 +0000 Subject: waiting is over: initial unicode commit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/font.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'firmware/export/font.h') 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 @@ #if LCD_HEIGHT > 64 #define MAX_FONT_SIZE 10000 #else -#define MAX_FONT_SIZE 4000 +#define MAX_FONT_SIZE 4000 #endif #endif +#ifndef FONT_HEADER_SIZE +#define FONT_HEADER_SIZE 36 +#endif + +#define GLYPH_CACHE_FILE "/.rockbox/.glyphcache" + /* * Fonts are specified by number, and used for display * of menu information as well as mp3 filename data. @@ -88,6 +94,7 @@ struct font { const unsigned short *offset; /* offsets into bitmap data*/ const unsigned char *width; /* character widths or NULL if fixed*/ int defaultchar; /* default char (not glyph index)*/ + long bits_size; /* # bytes of glyph bits*/ }; /* font routines*/ @@ -96,6 +103,10 @@ struct font* font_load(const char *path); struct font* font_get(int font); void font_reset(void); int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber); +int font_get_width(struct font* ft, unsigned short ch); +const unsigned char * font_get_bits(struct font* ft, unsigned short ch); +void glyph_cache_save(void); +void glyph_cache_load(void); #else /* HAVE_LCD_BITMAP */ -- cgit v1.2.3