font.h

Go to the documentation of this file.
00001 
00041 #ifndef GFX_FONT_H
00042 #define GFX_FONT_H
00043 
00044 #include <cfg/compiler.h>  /* uint8_t */
00045 #include <cpu/pgm.h>     /* PROGMEM */
00046 
00047 typedef struct Font
00048 {
00055     const pgm_uint8_t *glyph;
00056 
00057     uint8_t width;     
00058     uint8_t height;    
00060     uint8_t first;     
00061     uint8_t last;      
00064     const pgm_uint16_t *offset;
00065     const pgm_uint8_t  *widths;
00066 
00067 } Font;
00068 
00069 
00071 #define FONT_HAS_GLYPH(font, c) ((c) >= (font)->first && (c) <= (font)->last)
00072 
00073 
00075 #define default_font font_luBS14
00076 extern const struct Font default_font;
00077 
00078 #endif /* GFX_FONT_H */