Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: cibomahto/LoLShield
base: master
...
head fork: phooky/LoLShield
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
2  Charliplexing.cpp
@@ -28,7 +28,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "WProgram.h"
+#include "Arduino.h"
#include <inttypes.h>
#include <avr/interrupt.h>
#include "Charliplexing.h"
View
2  Figure.cpp
@@ -25,7 +25,7 @@
#include "Charliplexing.h"
#include "Figure.h"
-#include "WProgram.h"
+#include "Arduino.h"
#include <inttypes.h>
View
216 Font.cpp
@@ -28,93 +28,58 @@
#include "Charliplexing.h"
#include <inttypes.h>
-prog_uchar letters_71[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,7, 2,1, 2,4, 2,7, 3,1, 3,2, 3,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_83[] PROGMEM = { 0,2, 0,3, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,5, 3,6, 9,9 };
-prog_uchar letters_67[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 1,1, 1,7, 2,1, 2,7, 3,1, 3,7, 9,9 };
-prog_uchar letters_76[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,7, 2,7, 3,7, 9,9 };
-prog_uchar letters_89[] PROGMEM = { 0,1, 0,2, 1,3, 2,4, 2,5, 2,6, 2,7, 3,3, 4,1, 4,2, 9,9 };
-prog_uchar letters_82[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 2,1, 2,4, 2,5, 3,1, 3,4, 3,6, 4,2, 4,3, 4,7, 9,9 };
-prog_uchar letters_79[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 1,1, 1,7, 2,1, 2,7, 3,2, 3,3, 3,4, 3,5, 3,6, 9,9 };
-prog_uchar letters_33[] PROGMEM = { 1,1, 1,2, 1,3, 1,4, 1,5, 1,7, 9,9 };
-prog_uchar letters_65[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 2,1, 2,4, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_87[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,6, 2,5, 3,6, 4,1, 4,2, 4,3, 4,4, 4,5, 4,6, 4,7, 9,9 };
-prog_uchar letters_69[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 9,9 };
-prog_uchar letters_80[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 2,1, 2,4, 3,2, 3,3, 9,9 };
-prog_uchar letters_50[] PROGMEM = { 0,2, 0,5, 0,6, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,2, 4,3, 4,7, 9,9 };
-prog_uchar letters_49[] PROGMEM = { 1,2, 1,7, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 2,7, 3,7, 9,9 };
-prog_uchar letters_74[] PROGMEM = { 0,7, 1,1, 1,7, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 3,1, 9,9 };
-prog_uchar letters_68[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,7, 2,1, 2,7, 3,2, 3,3, 3,4, 3,5, 3,6, 9,9 };
-prog_uchar letters_90[] PROGMEM = { 0,1, 0,6, 0,7, 1,1, 1,5, 1,7, 2,1, 2,4, 2,7, 3,1, 3,3, 3,7, 4,1, 4,2, 4,7, 9,9 };
-prog_uchar letters_70[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 2,1, 2,4, 3,1, 3,4, 9,9 };
-prog_uchar letters_88[] PROGMEM = { 0,1, 0,2, 0,6, 0,7, 1,3, 1,5, 2,4, 3,3, 3,5, 4,1, 4,2, 4,6, 4,7, 9,9 };
-prog_uchar letters_75[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,4, 2,3, 2,5, 3,1, 3,2, 3,6, 3,7, 9,9 };
-prog_uchar letters_53[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,1, 4,5, 4,6, 9,9 };
-prog_uchar letters_48[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 1,1, 1,7, 2,1, 2,7, 3,1, 3,7, 4,2, 4,3, 4,4, 4,5, 4,6, 9,9 };
-prog_uchar letters_77[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,2, 2,3, 3,2, 4,1, 4,2, 4,3, 4,4, 4,5, 4,6, 4,7, 9,9 };
-prog_uchar letters_54[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,2, 4,5, 4,6, 9,9 };
-prog_uchar letters_39[] PROGMEM = { 1,3, 2,1, 2,2, 9,9 };
-prog_uchar letters_85[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 1,7, 2,7, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 9,9 };
-prog_uchar letters_57[] PROGMEM = { 0,2, 0,3, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,2, 4,3, 4,4, 4,5, 4,6, 9,9 };
-prog_uchar letters_78[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,2, 2,3, 3,4, 4,1, 4,2, 4,3, 4,4, 4,5, 4,6, 4,7, 9,9 };
-prog_uchar letters_84[] PROGMEM = { 0,1, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, 2,1, 9,9 };
-prog_uchar letters_81[] PROGMEM = { 0,2, 0,3, 0,4, 0,5, 0,6, 1,1, 1,7, 2,1, 2,5, 2,7, 3,1, 3,6, 4,2, 4,3, 4,4, 4,5, 4,7, 9,9 };
-prog_uchar letters_51[] PROGMEM = { 0,2, 0,6, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,2, 4,3, 4,5, 4,6, 9,9 };
-prog_uchar letters_86[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 1,6, 2,7, 3,6, 4,1, 4,2, 4,3, 4,4, 4,5, 9,9 };
-prog_uchar letters_72[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,4, 2,4, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_73[] PROGMEM = { 0,1, 0,7, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, 2,1, 2,7, 9,9 };
-prog_uchar letters_44[] PROGMEM = { 1,7, 2,5, 2,6, 9,9 };
-prog_uchar letters_56[] PROGMEM = { 0,2, 0,3, 0,5, 0,6, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,4, 3,7, 4,2, 4,3, 4,5, 4,6, 9,9 };
-prog_uchar letters_66[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,2, 3,3, 3,5, 3,6, 9,9 };
-prog_uchar letters_52[] PROGMEM = { 0,4, 0,5, 1,3, 1,5, 2,2, 2,5, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, 4,5, 9,9 };
-prog_uchar letters_55[] PROGMEM = { 0,1, 1,1, 2,1, 2,5, 2,6, 2,7, 3,1, 3,3, 3,4, 4,1, 4,2, 9,9 };
-
-prog_uchar* font[] = { letters_33 /*!*/, 0, 0, 0, 0, 0, letters_39 /*'*/, 0, 0, 0, 0, letters_44 /*,*/, 0, 0, 0,
-letters_48 /*0*/, letters_49 /*1*/, letters_50 /*2*/, letters_51 /*3*/, letters_52 /*4*/, letters_53 /*5*/,
-letters_54 /*6*/, letters_55 /*7*/, letters_56 /*8*/, letters_57 /*9*/, 0, 0, 0, 0, 0, 0, 0, letters_65 /*A*/,
-letters_66 /*B*/, letters_67 /*C*/, letters_68 /*D*/, letters_69 /*E*/, letters_70 /*F*/, letters_71 /*G*/,
-letters_72 /*H*/, letters_73 /*I*/, letters_74 /*J*/, letters_75 /*K*/, letters_76 /*L*/, letters_77 /*M*/,
-letters_78 /*N*/, letters_79 /*O*/, letters_80 /*P*/, letters_81 /*Q*/, letters_82 /*R*/, letters_83 /*S*/,
-letters_84 /*T*/, letters_85 /*U*/, letters_86 /*V*/, letters_87 /*W*/, letters_88 /*X*/, letters_89 /*Y*/,
-letters_90 /*Z*/
-};
-
-
-uint16_t fontMin=33;
-uint16_t fontMax=90;
-
-#if 0
-
-// This section of the font works now, but doesn't appear to be correct.
-
-prog_uchar letters_117[] PROGMEM = { 0,4, 0,5, 0,6, 1,7, 2,7, 3,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_104[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,4, 2,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_109[] PROGMEM = { 0,4, 0,5, 0,6, 0,7, 1,4, 2,5, 2,6, 2,7, 3,4, 4,5, 4,6, 4,7, 9,9 };
-prog_uchar letters_114[] PROGMEM = { 0,4, 0,5, 0,6, 0,7, 1,4, 2,4, 9,9 };
-prog_uchar letters_108[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 9,9 };
-prog_uchar letters_116[] PROGMEM = { 0,2, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, 2,2, 2,7, 3,7, 9,9 };
-prog_uchar letters_107[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,5, 2,4, 2,6, 3,3, 3,7, 9,9 };
-prog_uchar letters_118[] PROGMEM = { 0,4, 0,5, 1,6, 2,7, 3,6, 4,4, 4,5, 9,9 };
-prog_uchar letters_98[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,4, 1,7, 2,4, 2,7, 3,5, 3,6, 9,9 };
-prog_uchar letters_120[] PROGMEM = { 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, 1,5, 2,4, 2,6, 3,3, 3,7, 9,9 };
-prog_uchar letters_119[] PROGMEM = { 0,4, 0,5, 1,6, 1,7, 2,4, 2,5, 3,6, 3,7, 4,4, 4,5, 9,9 };
-prog_uchar letters_111[] PROGMEM = { 0,5, 0,6, 1,4, 1,7, 2,4, 2,7, 3,5, 3,6, 9,9 };
-prog_uchar letters_105[] PROGMEM = { 0,1, 0,3, 0,4, 0,5, 0,6, 0,7, 9,9 };
-prog_uchar letters_110[] PROGMEM = { 0,4, 0,5, 0,6, 0,7, 1,4, 2,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_113[] PROGMEM = { 0,4, 0,5, 1,3, 1,6, 2,3, 2,6, 3,3, 3,4, 3,5, 3,6, 3,7, 3,8, 9,9 };
-prog_uchar letters_100[] PROGMEM = { 0,2, 0,3, 1,1, 1,4, 1,7, 2,1, 2,4, 2,7, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 9,9 };
-prog_uchar letters_103[] PROGMEM = { 0,3, 0,4, 0,8, 1,2, 1,5, 1,8, 2,2, 2,5, 2,8, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_112[] PROGMEM = { 0,3, 0,4, 0,5, 0,6, 0,7, 0,8, 1,3, 1,6, 2,3, 2,6, 3,4, 3,5, 9,9 };
-prog_uchar letters_101[] PROGMEM = { 0,4, 0,5, 0,6, 1,3, 1,5, 1,7, 2,3, 2,5, 2,7, 3,4, 3,5, 3,7, 9,9 };
-prog_uchar letters_102[] PROGMEM = { 0,5, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, 2,1, 2,5, 3,1, 9,9 };
-prog_uchar letters_115[] PROGMEM = { 0,3, 0,4, 0,7, 1,3, 1,5, 1,7, 2,3, 2,5, 2,7, 3,3, 3,5, 3,6, 3,7, 9,9 };
-prog_uchar letters_99[] PROGMEM = { 0,5, 0,6, 1,4, 1,7, 2,4, 2,7, 3,4, 3,7, 9,9 };
-prog_uchar letters_106[] PROGMEM = { 0,8, 1,2, 1,4, 1,5, 1,6, 1,7, 1,8, 9,9 };
-prog_uchar letters_97[] PROGMEM = { 0,6, 0,7, 1,3, 1,5, 1,7, 2,3, 2,5, 2,7, 3,4, 3,5, 3,6, 3,7, 9,9 };
-
-prog_uchar* font2[] = { 0, 0, 0, 0, 0, 0, letters_97 /*a*/, letters_98 /*b*/, letters_99 /*c*/, letters_100 /*d*/, letters_101 /*e*/, letters_102 /*f*/, letters_103 /*g*/, letters_104 /*h*/, letters_105 /*i*/, letters_106 /*j*/, letters_107 /*k*/, letters_108 /*l*/, letters_109 /*m*/, letters_110 /*n*/, letters_111 /*o*/, letters_112 /*p*/, letters_113 /*q*/, letters_114 /*r*/, letters_115 /*s*/, letters_116 /*t*/, letters_117 /*u*/, letters_118 /*v*/, letters_119 /*w*/, letters_120 /*x*/ };
-*/
+extern Font::font_defn robofont;
+extern Font::font_defn verdfont;
+extern Font::font_defn msfont;
+
+#define LOL_HEIGHT 9
+#define LOL_WIDTH 14
-#endif
+Font::font_defn* currentFont = &robofont;
+
+uint8_t get_char_len(uint8_t c) {
+ return pgm_read_byte(&(currentFont->table[c].len));
+}
+
+uint8_t get_char_bit(uint8_t c, uint8_t row, uint8_t column) {
+ uint8_t offset = pgm_read_byte(&(currentFont->table[c].offset));
+ uint8_t col = pgm_read_byte(&(currentFont->data[offset+column]));
+ return ((col & _BV(row)) == 0)?0:1;
+}
+
+
+uint8_t drawInternal(unsigned char letter,int x,int y,int set,uint8_t rotate=0) {
+ uint16_t len = get_char_len(letter);
+
+ for (uint16_t row = 0; row < LOL_HEIGHT; row++) {
+ for (uint16_t col = 0; col < len; col++) {
+ uint8_t bit = get_char_bit(letter, row, col);
+ int xp, yp;
+ if (rotate == 0) {
+ xp = x+col; yp = y+row;
+ } else if (rotate == 1) {
+ yp = x+col; xp = y+row;
+ }
+ if (bit && xp >=0 && xp < LOL_WIDTH && yp >=0 && yp < LOL_HEIGHT) {
+ if (!rotate) {
+ LedSign::Set(xp, yp, set);
+ } else {
+ LedSign::Set(yp, xp, set);
+ }
+ }
+ }
+ }
+ return len+1;
+}
+
+void Font::SetFont(CharFont f) {
+ switch(f) {
+ case ROBO_FONT: currentFont = &robofont; break;
+ case MS_FONT: currentFont = &msfont; break;
+ case VERDANA_FONT: currentFont = &verdfont; break;
+ default: currentFont = &robofont;
+ }
+}
/* ----------------------------------------------------------------- */
/** Draws a figure (0-9). You should call it with set=1,
@@ -124,44 +89,7 @@ prog_uchar* font2[] = { 0, 0, 0, 0, 0, 0, letters_97 /*a*/, letters_98 /*
* @param set is 1 or 0 to draw or clear it
*/
uint8_t Font::Draw(unsigned char letter,int x,int y,int set) {
- uint16_t maxx=0;
-
- uint8_t charCol;
- uint8_t charRow;
-
- prog_uchar* character;
- if (letter==' ') return 3+2;
- if (letter<fontMin || letter>fontMax) {
- return 0;
- }
-
-// if (letter>90) {
-// character = font2[letter-90];
-// } else {
- character = font[letter-fontMin];
-// }
-
- int i=0;
-
- charCol = pgm_read_byte_near(character);
- charRow = pgm_read_byte_near(character + 1);
-
- while (charRow!=9) {
- if (charCol>maxx) maxx=charCol;
- if (
- charCol + x <14 &&
- charCol + x >=0 &&
- charRow + y <8 &&
- charRow + y >=0
- ) {
- LedSign::Set(charCol + x, charRow+y, set);
- }
- i+=2;
-
- charCol = pgm_read_byte_near(character + i);
- charRow = pgm_read_byte_near(character + 1 + i);
- }
- return maxx+2;
+ return drawInternal(letter,x,y,set);
}
@@ -172,45 +100,7 @@ uint8_t Font::Draw(unsigned char letter,int x,int y,int set) {
* @param set is 1 or 0 to draw or clear it
*/
uint8_t Font::Draw90(unsigned char letter,int x,int y,int set) {
- uint16_t maxx=0;
-
- uint8_t charCol;
- uint8_t charRow;
-
- prog_uchar* character;
- if (letter==' ') return 3+2;
- if (letter<fontMin || letter>fontMax) {
- return 0;
- }
-
-// if (letter>90) {
-// character = font2[letter-90];
-// } else {
- character = font[letter-fontMin];
-// }
-
- int i=0;
-
- charCol = pgm_read_byte_near(character);
- charRow = pgm_read_byte_near(character + 1);
-
- while (charRow!=9) {
- if (charCol>maxx) maxx=charCol;
- if (
- charRow + x <14 &&
- charRow + x >=0 &&
- charCol + y <8 &&
- charCol + y >=0
- ) {
- LedSign::Set(7 - charRow + x, charCol + y, set);
- }
- i+=2;
-
- charCol = pgm_read_byte_near(character + i);
- charRow = pgm_read_byte_near(character + 1 + i);
- }
- return maxx+2;
-
+ return drawInternal(letter,x,y,set,1);
}
View
21 Font.h
@@ -26,10 +26,31 @@
#define Font_h
#include <inttypes.h>
+#include <avr/pgmspace.h>
namespace Font
{
+typedef struct {
+ uint8_t offset;
+ uint8_t len;
+} PROGMEM char_entry;
+
+typedef struct {
+ uint8_t height;
+ uint16_t len;
+ char_entry* table;
+ prog_uint8_t* data;
+} font_defn;
+
+typedef enum {
+ ROBO_FONT = 0,
+ VERDANA_FONT,
+ MS_FONT
+} CharFont;
+
+extern void SetFont(CharFont f);
+
extern uint8_t Draw(unsigned char letter,int x,int y,int set=1);
extern uint8_t Draw90(unsigned char letter,int x,int y,int set=1);
View
326 Msfont.cpp
@@ -0,0 +1,326 @@
+#include "Font.h"
+
+#define MSFONT_HEIGHT 7
+#define MSFONT_DATA_SIZE 179
+
+Font::char_entry msfont_table[128] PROGMEM = {
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0, 1},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {1, 1},
+ {0,0},
+ {2, 5},
+ {7, 2},
+ {9, 4},
+ {13, 4},
+ {17, 4},
+ {21, 4},
+ {25, 4},
+ {29, 4},
+ {33, 4},
+ {37, 4},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {41, 4},
+ {45, 6},
+ {51, 5},
+ {56, 4},
+ {60, 5},
+ {65, 4},
+ {69, 4},
+ {73, 4},
+ {77, 5},
+ {82, 5},
+ {87, 3},
+ {90, 4},
+ {94, 5},
+ {99, 4},
+ {103, 7},
+ {110, 6},
+ {116, 6},
+ {122, 5},
+ {127, 5},
+ {132, 4},
+ {136, 4},
+ {140, 5},
+ {145, 5},
+ {150, 5},
+ {155, 7},
+ {162, 7},
+ {169, 5},
+ {174, 5},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+
+};
+
+prog_uint8_t msfont_data[MSFONT_DATA_SIZE] PROGMEM = {
+0x5f,
+0x40,
+0x3e,
+0x41,
+0x41,
+0x41,
+0x3e,
+0x2,
+0x7f,
+0x62,
+0x51,
+0x49,
+0x46,
+0x22,
+0x49,
+0x49,
+0x36,
+0xf,
+0x8,
+0x8,
+0x7f,
+0x2f,
+0x49,
+0x49,
+0x39,
+0x3e,
+0x49,
+0x49,
+0x32,
+0x1,
+0x61,
+0x19,
+0x7,
+0x36,
+0x49,
+0x49,
+0x36,
+0x26,
+0x49,
+0x49,
+0x3e,
+0x2,
+0x59,
+0x9,
+0x6,
+0x3e,
+0x41,
+0x5d,
+0x55,
+0x4e,
+0x20,
+0x7e,
+0x9,
+0x9,
+0x9,
+0x7e,
+0x7f,
+0x49,
+0x49,
+0x36,
+0x3e,
+0x41,
+0x41,
+0x41,
+0x22,
+0x7f,
+0x41,
+0x41,
+0x3e,
+0x7f,
+0x49,
+0x49,
+0x41,
+0x7f,
+0x9,
+0x9,
+0x1,
+0x3e,
+0x41,
+0x41,
+0x49,
+0x3a,
+0x7f,
+0x8,
+0x8,
+0x8,
+0x7f,
+0x41,
+0x7f,
+0x41,
+0x20,
+0x40,
+0x40,
+0x3f,
+0x7f,
+0x8,
+0x14,
+0x23,
+0x40,
+0x7f,
+0x40,
+0x40,
+0x40,
+0x7f,
+0x2,
+0x4,
+0x8,
+0x4,
+0x2,
+0x7f,
+0x7f,
+0x2,
+0x4,
+0x8,
+0x10,
+0x7f,
+0x3e,
+0x41,
+0x41,
+0x41,
+0x41,
+0x3e,
+0x7f,
+0x9,
+0x9,
+0x9,
+0x6,
+0x3e,
+0x41,
+0x51,
+0x21,
+0x5e,
+0x7f,
+0x9,
+0x19,
+0x66,
+0x26,
+0x49,
+0x49,
+0x32,
+0x1,
+0x1,
+0x7f,
+0x1,
+0x1,
+0x3f,
+0x40,
+0x40,
+0x40,
+0x3f,
+0x1f,
+0x20,
+0x40,
+0x20,
+0x1f,
+0x7f,
+0x20,
+0x10,
+0x8,
+0x10,
+0x20,
+0x7f,
+0x41,
+0x22,
+0x14,
+0x8,
+0x14,
+0x22,
+0x41,
+0x7,
+0x8,
+0x78,
+0x8,
+0x7,
+0x61,
+0x51,
+0x49,
+0x45,
+0x43,
+
+};
+
+Font::font_defn msfont = {
+ MSFONT_HEIGHT,
+ MSFONT_DATA_SIZE,
+ msfont_table,
+ msfont_data
+};
View
335 Robofont.cpp
@@ -0,0 +1,335 @@
+#include "Font.h"
+
+#define ROBOFONT_HEIGHT 9
+#define ROBOFONT_DATA_SIZE 188
+
+Font::char_entry robofont_table[128] PROGMEM = {
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0, 1},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {1, 5},
+ {0,0},
+ {6, 5},
+ {11, 4},
+ {15, 5},
+ {20, 5},
+ {25, 5},
+ {30, 5},
+ {35, 5},
+ {40, 5},
+ {45, 5},
+ {50, 5},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {55, 1},
+ {56, 5},
+ {61, 5},
+ {66, 5},
+ {71, 5},
+ {76, 5},
+ {81, 5},
+ {86, 5},
+ {91, 5},
+ {96, 5},
+ {101, 2},
+ {103, 5},
+ {108, 5},
+ {113, 5},
+ {118, 5},
+ {123, 5},
+ {128, 5},
+ {133, 5},
+ {138, 5},
+ {143, 5},
+ {148, 5},
+ {153, 5},
+ {158, 5},
+ {163, 5},
+ {168, 5},
+ {173, 5},
+ {178, 5},
+ {183, 5},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+
+};
+
+prog_uint8_t robofont_data[ROBOFONT_DATA_SIZE] PROGMEM = {
+0x40,
+0x7e,
+0x42,
+0x42,
+0x42,
+0x7e,
+0x7e,
+0x42,
+0x42,
+0x42,
+0x7e,
+0x40,
+0x42,
+0x7e,
+0x40,
+0x78,
+0x4a,
+0x4a,
+0x4a,
+0xe,
+0x40,
+0x4a,
+0x4a,
+0x4a,
+0x7e,
+0x1e,
+0x10,
+0x10,
+0x7c,
+0x10,
+0x4e,
+0x4a,
+0x4a,
+0x4a,
+0x78,
+0x7e,
+0x4a,
+0x4a,
+0x4a,
+0x78,
+0x42,
+0x22,
+0x12,
+0xa,
+0x6,
+0x7e,
+0x4a,
+0x4a,
+0x4a,
+0x7e,
+0xe,
+0x4a,
+0x4a,
+0x4a,
+0x7e,
+0x5e,
+0x6,
+0x6,
+0x52,
+0x12,
+0x1e,
+0x7e,
+0xa,
+0xa,
+0x7e,
+0x7e,
+0x7e,
+0x7a,
+0x4a,
+0x4e,
+0x78,
+0x7e,
+0x7e,
+0x42,
+0x42,
+0x42,
+0x7e,
+0x7e,
+0x42,
+0x42,
+0x3c,
+0x7e,
+0x7a,
+0x4a,
+0x4a,
+0x4a,
+0x7e,
+0x7a,
+0xa,
+0xa,
+0xa,
+0x7e,
+0x7e,
+0x42,
+0x56,
+0x76,
+0x7e,
+0x7e,
+0x8,
+0x8,
+0x7e,
+0x7e,
+0x7e,
+0x60,
+0x60,
+0x40,
+0x40,
+0x7e,
+0x7e,
+0x7e,
+0x18,
+0x24,
+0x42,
+0x7e,
+0x60,
+0x60,
+0x60,
+0x60,
+0x7e,
+0x2,
+0xe,
+0x2,
+0x7e,
+0x7e,
+0x7a,
+0x2,
+0x2,
+0x7e,
+0x7e,
+0x42,
+0x42,
+0x46,
+0x7e,
+0x7e,
+0x7a,
+0xa,
+0xa,
+0xe,
+0x7e,
+0x42,
+0xe2,
+0xe2,
+0x7e,
+0x7e,
+0x7a,
+0xa,
+0xe,
+0x78,
+0x6e,
+0x6a,
+0x4a,
+0x4a,
+0x7a,
+0x2,
+0x2,
+0x7e,
+0x7a,
+0x2,
+0x7e,
+0x40,
+0x40,
+0x7e,
+0x7e,
+0x1e,
+0x3e,
+0x40,
+0x20,
+0x1e,
+0x7e,
+0x60,
+0x7e,
+0x40,
+0x7e,
+0x42,
+0x24,
+0x18,
+0x24,
+0x42,
+0xe,
+0xe,
+0x78,
+0x8,
+0xe,
+0x46,
+0x66,
+0x52,
+0x4a,
+0x46,
+
+};
+
+Font::font_defn robofont = {
+ ROBOFONT_HEIGHT,
+ ROBOFONT_DATA_SIZE,
+ robofont_table,
+ robofont_data
+};
View
397 Verdanafont.cpp
@@ -0,0 +1,397 @@
+
+#include "Font.h"
+
+#define VERDFONT_HEIGHT 8
+#define VERDFONT_DATA_SIZE 248
+
+Font::char_entry verdfont_table[128] PROGMEM = {
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0, 1},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {1, 2},
+ {3, 3},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {6, 1},
+ {7, 3},
+ {10, 6},
+ {16, 3},
+ {19, 6},
+ {25, 6},
+ {31, 6},
+ {37, 6},
+ {43, 6},
+ {49, 6},
+ {55, 6},
+ {61, 6},
+ {67, 1},
+ {68, 1},
+ {0,0},
+ {0,0},
+ {0,0},
+ {69, 5},
+ {74, 10},
+ {84, 7},
+ {91, 6},
+ {97, 6},
+ {103, 6},
+ {109, 6},
+ {115, 5},
+ {120, 8},
+ {128, 6},
+ {134, 1},
+ {135, 5},
+ {140, 6},
+ {146, 5},
+ {151, 7},
+ {158, 6},
+ {164, 8},
+ {172, 6},
+ {178, 8},
+ {186, 6},
+ {192, 6},
+ {198, 7},
+ {205, 6},
+ {211, 7},
+ {218, 10},
+ {228, 7},
+ {235, 7},
+ {242, 6},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+ {0,0},
+
+};
+
+prog_uint8_t verdfont_data[VERDFONT_DATA_SIZE] PROGMEM = {
+0xbf,
+0xfe,
+0x1,
+0x1,
+0x86,
+0x78,
+0x80,
+0xe0,
+0x1c,
+0x3,
+0x18,
+0xe6,
+0x81,
+0x81,
+0xc6,
+0x38,
+0x4,
+0x2,
+0xff,
+0x80,
+0xe6,
+0xa1,
+0x91,
+0x9a,
+0x84,
+0x44,
+0x82,
+0x91,
+0x89,
+0xde,
+0x20,
+0x20,
+0x38,
+0x24,
+0x22,
+0xff,
+0x20,
+0x40,
+0x8f,
+0x89,
+0x89,
+0xd9,
+0x20,
+0x18,
+0xf6,
+0x89,
+0x89,
+0xda,
+0x60,
+0x1,
+0x1,
+0xe1,
+0x19,
+0x7,
+0x1,
+0x60,
+0xde,
+0x89,
+0x89,
+0x9e,
+0x60,
+0xc,
+0xda,
+0x91,
+0x91,
+0xfe,
+0x18,
+0x84,
+0x84,
+0x3,
+0x1,
+0xb1,
+0xd,
+0x6,
+0x30,
+0xcc,
+0x2,
+0x71,
+0x49,
+0x45,
+0x65,
+0x9d,
+0x42,
+0x3e,
+0x80,
+0x70,
+0x2c,
+0x23,
+0x27,
+0x38,
+0xc0,
+0xff,
+0x89,
+0x89,
+0x89,
+0x9f,
+0x64,
+0x7e,
+0x81,
+0x81,
+0x81,
+0x81,
+0x62,
+0xff,
+0x81,
+0x81,
+0x81,
+0x81,
+0x7e,
+0xff,
+0x89,
+0x89,
+0x89,
+0x89,
+0x81,
+0xff,
+0x9,
+0x9,
+0x9,
+0x9,
+0x10,
+0x7e,
+0x81,
+0x81,
+0x91,
+0x91,
+0x53,
+0xf4,
+0xff,
+0x8,
+0x8,
+0x8,
+0x8,
+0xff,
+0xff,
+0x60,
+0x80,
+0x80,
+0x80,
+0x7f,
+0xff,
+0x18,
+0xc,
+0x36,
+0x43,
+0x81,
+0xff,
+0x80,
+0x80,
+0x80,
+0x80,
+0xff,
+0xe,
+0x70,
+0x80,
+0x70,
+0xe,
+0xff,
+0xff,
+0x6,
+0xc,
+0x30,
+0x40,
+0xff,
+0x18,
+0x66,
+0x81,
+0x81,
+0x81,
+0x81,
+0xc3,
+0x7c,
+0xff,
+0x11,
+0x11,
+0x11,
+0x9,
+0xe,
+0x18,
+0x66,
+0x81,
+0x81,
+0x81,
+0xc1,
+0xc3,
+0x7c,
+0xff,
+0x11,
+0x11,
+0x11,
+0x19,
+0xfe,
+0xee,
+0x89,
+0x89,
+0x91,
+0x93,
+0x64,
+0x1,
+0x1,
+0x1,
+0xff,
+0x1,
+0x1,
+0x1,
+0x7f,
+0x80,
+0x80,
+0x80,
+0x80,
+0x7f,
+0x1,
+0x7,
+0x38,
+0xc0,
+0x60,
+0x1c,
+0x3,
+0x1,
+0x1f,
+0xe0,
+0xf0,
+0xe,
+0x7,
+0x38,
+0xc0,
+0x78,
+0x7,
+0x1,
+0xc3,
+0x26,
+0x18,
+0x3c,
+0x43,
+0x81,
+0x1,
+0x3,
+0xc,
+0xf8,
+0x8,
+0x6,
+0x1,
+0x80,
+0xc1,
+0xb1,
+0x99,
+0x85,
+0x83,
+
+};
+
+
+Font::font_defn verdfont = {
+ VERDFONT_HEIGHT,
+ VERDFONT_DATA_SIZE,
+ verdfont_table,
+ verdfont_data
+};
View
2  fonts/font_generator.py
@@ -16,7 +16,7 @@
# Edit this to reflect the order that characters appear
# in your font. Each character should be seperated by
# one column of white pixels.
-char_order = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.!?@/:;()"
+char_order = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.!?@/:;()"
# Header and types for font.
# We're a little tight on space, so it's program memory

No commit comments for this range

Something went wrong with that request. Please try again.