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