font.h
Go to the documentation of this file.00001 00040 /*#* 00041 *#* $Log$ 00042 *#* Revision 1.7 2006/07/19 12:56:26 bernie 00043 *#* Convert to new Doxygen style. 00044 *#* 00045 *#* Revision 1.6 2006/05/27 22:31:34 bernie 00046 *#* Switch to a smaller default fount. 00047 *#* 00048 *#* Revision 1.5 2006/03/13 02:06:04 bernie 00049 *#* FONT_HAS_GLYPH(): New macro. 00050 *#* 00051 *#* Revision 1.4 2006/02/15 09:10:15 bernie 00052 *#* Implement prop fonts; Fix algo styles. 00053 *#* 00054 *#* Revision 1.3 2006/02/10 12:29:05 bernie 00055 *#* Add multiple font support in bitmaps. 00056 *#* 00057 *#* Revision 1.2 2005/11/04 18:17:45 bernie 00058 *#* Fix header guards and includes for new location of gfx module. 00059 *#* 00060 *#* Revision 1.1 2005/11/04 18:11:35 bernie 00061 *#* Move graphics stuff from mware/ to gfx/. 00062 *#* 00063 *#* Revision 1.6 2005/04/11 19:10:28 bernie 00064 *#* Include top-level headers from cfg/ subdir. 00065 *#* 00066 *#* Revision 1.5 2005/03/01 23:26:45 bernie 00067 *#* Use new CPU-neutral program-memory API. 00068 *#* 00069 *#* Revision 1.4 2004/12/31 16:42:55 bernie 00070 *#* Sanitize for non-Harvard processors. 00071 *#* 00072 *#* Revision 1.3 2004/08/25 14:12:09 rasky 00073 *#* Aggiornato il comment block dei log RCS 00074 *#* 00075 *#* Revision 1.2 2004/06/03 11:27:09 bernie 00076 *#* Add dual-license information. 00077 *#* 00078 *#* Revision 1.1 2004/05/23 15:43:16 bernie 00079 *#* Import mware modules. 00080 *#* 00081 *#* Revision 1.2 2004/03/24 15:48:53 bernie 00082 *#* Remove Copyright messages from Doxygen output 00083 *#* 00084 *#* Revision 1.1 2004/01/13 12:15:28 aleph 00085 *#* Move font table in program memory; add font.h 00086 *#* 00087 *#*/ 00088 #ifndef GFX_FONT_H 00089 #define GFX_FONT_H 00090 00091 #include <cfg/compiler.h> /* uint8_t */ 00092 #include <mware/pgm.h> /* PROGMEM */ 00093 00094 typedef struct Font 00095 { 00102 const PROGMEM uint8_t *glyph; 00103 00104 uint8_t width; 00105 uint8_t height; 00107 uint8_t first; 00108 uint8_t last; 00111 const PROGMEM uint16_t *offset; 00112 const PROGMEM uint8_t *widths; 00113 00114 } Font; 00115 00116 00118 #define FONT_HAS_GLYPH(font, c) ((c) >= (font)->first && (c) <= (font)->last) 00119 00120 00122 #define default_font font_luBS14 00123 extern const struct Font default_font; 00124 00125 #endif /* GFX_FONT_H */
