4 * This file is part of BeRTOS.
6 * Bertos is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/)
35 * \author Stefano Fedrigo <aleph@develer.com>
37 * \brief Font 8x6 IBM-PC 8bit
42 *#* Revision 1.7 2006/07/19 12:56:26 bernie
43 *#* Convert to new Doxygen style.
45 *#* Revision 1.6 2006/05/27 22:31:34 bernie
46 *#* Switch to a smaller default fount.
48 *#* Revision 1.5 2006/03/13 02:06:04 bernie
49 *#* FONT_HAS_GLYPH(): New macro.
51 *#* Revision 1.4 2006/02/15 09:10:15 bernie
52 *#* Implement prop fonts; Fix algo styles.
54 *#* Revision 1.3 2006/02/10 12:29:05 bernie
55 *#* Add multiple font support in bitmaps.
57 *#* Revision 1.2 2005/11/04 18:17:45 bernie
58 *#* Fix header guards and includes for new location of gfx module.
60 *#* Revision 1.1 2005/11/04 18:11:35 bernie
61 *#* Move graphics stuff from mware/ to gfx/.
63 *#* Revision 1.6 2005/04/11 19:10:28 bernie
64 *#* Include top-level headers from cfg/ subdir.
66 *#* Revision 1.5 2005/03/01 23:26:45 bernie
67 *#* Use new CPU-neutral program-memory API.
69 *#* Revision 1.4 2004/12/31 16:42:55 bernie
70 *#* Sanitize for non-Harvard processors.
72 *#* Revision 1.3 2004/08/25 14:12:09 rasky
73 *#* Aggiornato il comment block dei log RCS
75 *#* Revision 1.2 2004/06/03 11:27:09 bernie
76 *#* Add dual-license information.
78 *#* Revision 1.1 2004/05/23 15:43:16 bernie
79 *#* Import mware modules.
81 *#* Revision 1.2 2004/03/24 15:48:53 bernie
82 *#* Remove Copyright messages from Doxygen output
84 *#* Revision 1.1 2004/01/13 12:15:28 aleph
85 *#* Move font table in program memory; add font.h
91 #include <cfg/compiler.h> /* uint8_t */
92 #include <mware/pgm.h> /* PROGMEM */
97 * Pointer to glyph data.
99 * Data is an array of at most 256 glyphs packed together.
100 * Raster format must be the same of the bitmap.
102 const PROGMEM uint8_t *glyph;
104 uint8_t width; /**< Pixel width of character cell. */
105 uint8_t height; /**< Pixel height of character cell. */
107 uint8_t first; /**< First encoded character in glyph array. */
108 uint8_t last; /**< Last encoded character in glyph array (inclusive). */
110 /** Array of glyph offsets in bytes. NULL for fixed-width fonts. */
111 const PROGMEM uint16_t *offset;
112 const PROGMEM uint8_t *widths;
117 /** Return true if glyph \a c is available in \a font. */
118 #define FONT_HAS_GLYPH(font, c) ((c) >= (font)->first && (c) <= (font)->last)
121 /** The default font. */
122 #define default_font font_luBS14
123 extern const struct Font default_font;
125 #endif /* GFX_FONT_H */