MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
A:/eclipse/mhvlib/MHV_Font_SansSerif_10x8.h
Go to the documentation of this file.
00001 /* Copyright (c) 2011, Make, Hack, Void Inc
00002  * All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions are met:
00006  *  * Redistributions of source code must retain the above copyright
00007  *    notice, this list of conditions and the following disclaimer.
00008  *  * Redistributions in binary form must reproduce the above copyright
00009  *    notice, this list of conditions and the following disclaimer in the
00010  *    documentation and/or other materials provided with the distribution.
00011  *  * Neither the name of the Make, Hack, Void nor the
00012  *    names of its contributors may be used to endorse or promote products
00013  *    derived from this software without specific prior written permission.
00014  *
00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00016  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00017  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00018  * DISCLAIMED. IN NO EVENT SHALL MAKE, HACK, VOID BE LIABLE FOR ANY
00019  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00020  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00021  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00022  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00023  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00024  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025  */
00026 
00027 #ifndef MHV_FONT_SANSSERIF_8X10_H
00028 #define MHV_FONT_SANSSERIF_8X10_H
00029 
00030 #include <MHV_Font.h>
00031 
00032 #include <inttypes.h>
00033 #include <avr/pgmspace.h>
00034 
00035 // Font widths
00036 static const uint8_t mhv_fontSansSerif8x10Widths[] PROGMEM = {
00037             0x01, 0x01, 0x01, 0x05, 0x05, 0x06, 0x05, 0x01, 0x02, 0x02,
00038             0x01, 0x03, 0x02, 0x02, 0x01, 0x03, 0x04, 0x02, 0x04, 0x04,
00039             0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x01, 0x02, 0x04, 0x04,
00040             0x04, 0x05, 0x08, 0x05, 0x04, 0x05, 0x04, 0x04, 0x04, 0x06,
00041             0x04, 0x01, 0x03, 0x04, 0x03, 0x05, 0x04, 0x06, 0x04, 0x06,
00042             0x04, 0x05, 0x05, 0x04, 0x05, 0x07, 0x05, 0x05, 0x05, 0x02,
00043             0x03, 0x02, 0x03, 0x04, 0x01, 0x04, 0x03, 0x04, 0x04, 0x04,
00044             0x02, 0x04, 0x03, 0x01, 0x02, 0x03, 0x01, 0x05, 0x03, 0x04,
00045             0x03, 0x03, 0x02, 0x04, 0x02, 0x03, 0x03, 0x05, 0x03, 0x04,
00046             0x04, 0x03, 0x01, 0x03, 0x05, 0x00,
00047 };
00048 
00049 // Font offsets into the data table
00050 static const uint16_t mhv_fontSansSerif8x10Offsets[] PROGMEM = {
00051                   0,   1,   2,   3,   8,  13,  19,  24,  25, 27,
00052                  29,  30,  33,  35,  37,  38,  41,  45,  47, 51,
00053                  55,  59,  63,  67,  71,  75,  79,  80,  82, 86,
00054                  90,  94,  99, 107, 112, 116, 121, 125, 129, 133,
00055                 139, 143, 144, 147, 151, 154, 159, 163, 169, 173,
00056                 179, 183, 188, 193, 197, 202, 209, 214, 219, 224,
00057                 226, 229, 231, 234, 238, 239, 243, 246, 250, 254,
00058                 258, 260, 264, 267, 268, 270, 273, 274, 279, 282,
00059                 286, 289, 292, 294, 298, 300, 303, 306, 311, 314,
00060                 318, 322, 325, 326, 329, 334
00061 };
00062 
00063 //Font data
00064 static const uint8_t mhv_fontSansSerif8x10Data[] PROGMEM = {
00065     0x00, // 32
00066     0x2F, // 33
00067     0x03, // 34
00068     0x12, 0x3F, 0x12, 0x3F, 0x12, // 35
00069     0x12, 0x25, 0x7F, 0x29, 0x12, // 36
00070     0x23, 0x13, 0x08, 0x04, 0x32, 0x31, // 37
00071     0x10, 0x2A, 0x2D, 0x32, 0x28, // 38
00072     0x03, // 39
00073     0x7E, 0x81, // 40
00074     0x81, 0x7E, // 41
00075     0x03, // 42
00076     0x08, 0x1C, 0x08, // 43
00077     0x40, 0x20, // 44
00078     0x10, 0x10, // 45
00079     0x20, // 46
00080     0xE0, 0x18, 0x07, // 47
00081     0x1E, 0x21, 0x21, 0x1E, // 48
00082     0x02, 0x3F, // 49
00083     0x22, 0x31, 0x29, 0x26, // 50
00084     0x12, 0x21, 0x25, 0x1E, // 51
00085     0x0C, 0x0A, 0x3F, 0x08, // 52
00086     0x12, 0x25, 0x25, 0x39, // 53
00087     0x1E, 0x29, 0x29, 0x3A, // 54
00088     0x01, 0x31, 0x0D, 0x03, // 55
00089     0x1A, 0x25, 0x25, 0x1A, // 56
00090     0x26, 0x29, 0x29, 0x1E, // 57
00091     0x24, // 58
00092     0x40, 0x24, // 59
00093     0x08, 0x14, 0x14, 0x22, // 60
00094     0x14, 0x14, 0x14, 0x14, // 61
00095     0x22, 0x14, 0x14, 0x08, // 62
00096     0x02, 0x01, 0x29, 0x09, 0x06, // 63
00097     0x3C, 0x42, 0xBD, 0xA5, 0xA5, 0xBD, 0x22, 0x1C, // 64
00098     0x30, 0x0E, 0x09, 0x0E, 0x30, // 65
00099     0x3F, 0x29, 0x29, 0x1E, // 66
00100     0x1C, 0x22, 0x21, 0x21, 0x12, // 67
00101     0x3F, 0x21, 0x21, 0x1E, // 68
00102     0x3F, 0x29, 0x29, 0x21, // 69
00103     0x3F, 0x09, 0x09, 0x01, // 70
00104     0x0C, 0x32, 0x21, 0x29, 0x29, 0x1A, // 71
00105     0x3F, 0x04, 0x04, 0x3F, // 72
00106     0x3F, // 73
00107     0x10, 0x20, 0x3F, // 74
00108     0x3F, 0x0C, 0x12, 0x21, // 75
00109     0x3F, 0x20, 0x20, // 76
00110     0x3F, 0x02, 0x04, 0x02, 0x3F, // 77
00111     0x3F, 0x04, 0x08, 0x3F, // 78
00112     0x0C, 0x12, 0x21, 0x21, 0x12, 0x0C, // 79
00113     0x3F, 0x09, 0x09, 0x06, // 80
00114     0x0C, 0x12, 0x21, 0x29, 0x12, 0x2C, // 81
00115     0x3F, 0x09, 0x09, 0x36, // 82
00116     0x12, 0x25, 0x29, 0x29, 0x12, // 83
00117     0x01, 0x01, 0x3F, 0x01, 0x01, // 84
00118     0x3F, 0x20, 0x20, 0x3F, // 85
00119     0x03, 0x1C, 0x20, 0x1C, 0x03, // 86
00120     0x0F, 0x30, 0x0C, 0x03, 0x0C, 0x30, 0x0F, // 87
00121     0x21, 0x12, 0x0C, 0x12, 0x21, // 88
00122     0x01, 0x06, 0x38, 0x06, 0x01, // 89
00123     0x21, 0x31, 0x2D, 0x23, 0x21, // 90
00124     0xFF, 0x81, // 91
00125     0x07, 0x18, 0xE0, // 92
00126     0x81, 0xFF, // 93
00127     0x06, 0x01, 0x06, // 94
00128     0x80, 0x80, 0x80, 0x80, // 95
00129     0x01, // 96
00130     0x3A, 0x2A, 0x2A, 0x3C, // 97
00131     0x3F, 0x24, 0x3C, // 98
00132     0x18, 0x24, 0x24, 0x24, // 99
00133     0x18, 0x24, 0x24, 0x3F, // 100
00134     0x1C, 0x2A, 0x2A, 0x2C, // 101
00135     0x3E, 0x05, // 102
00136     0x48, 0x94, 0x94, 0x7C, // 103
00137     0x3F, 0x04, 0x3C, // 104
00138     0x3A, // 105
00139     0x80, 0x74, // 106
00140     0x3F, 0x08, 0x34, // 107
00141     0x3F, // 108
00142     0x3C, 0x04, 0x3C, 0x04, 0x3C, // 109
00143     0x3C, 0x04, 0x3C, // 110
00144     0x18, 0x24, 0x24, 0x18, // 111
00145     0x7C, 0x14, 0x1C, // 112
00146     0x1C, 0x14, 0x7C, // 113
00147     0x3C, 0x04, // 114
00148     0x24, 0x2A, 0x2A, 0x12, // 115
00149     0x1F, 0x24, // 116
00150     0x3C, 0x20, 0x3C, // 117
00151     0x0C, 0x30, 0x0C, // 118
00152     0x0C, 0x30, 0x0C, 0x30, 0x0C, // 119
00153     0x34, 0x08, 0x34, // 120
00154     0x4C, 0x90, 0x90, 0x7C, // 121
00155     0x24, 0x34, 0x2C, 0x24, // 122
00156     0x08, 0x76, 0x81, // 123
00157     0xE7, // 124
00158     0x81, 0x76, 0x08, // 125
00159     0x08, 0x04, 0x08, 0x10, 0x08, // 126
00160 };
00161 
00165 static const MHV_FONT mhv_fontSansSerif8x10 = {
00166         10,                                                             // width
00167         8,                                                              // height
00168         ' ',                                                    // first character
00169         0x60,                                                   // character count
00170         ' ',                                                    // unknown character
00171         1,                                                              // number of bytes per column
00172         mhv_fontSansSerif8x10Widths,    // widths
00173         mhv_fontSansSerif8x10Offsets,   // offsets
00174         mhv_fontSansSerif8x10Data               // data
00175 };
00176 
00177 
00178 #endif /* MHV_FONT_SANSSERIF_8X10_H */