# vectorscope / hershey.c

 ```Trammell Hudson ad2f608 2012-09-01 ``` ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188``` ```/** \file * Hershey fonts for the numbers 0-9 * From: * http://paulbourke.net/dataformats/hershey/ * * Point x,y == -1 => pen up * Otherwise draw in a continuous path */ #include "hershey.h" #define POINT(x,y) { x, y } const path_t digits[][32] = { [0] = { POINT( 9,21), POINT( 6,20), POINT( 4,17), POINT( 3,12), POINT( 3, 9), POINT( 4, 4), POINT( 6, 1), POINT( 9, 0), POINT(11, 0), POINT(14, 1), POINT(16, 4), POINT(17, 9), POINT(17,12), POINT(16,17), POINT(14,20), POINT(11,21), POINT( 9,21), }, [1] = { POINT( 6,17), POINT( 8,18), POINT(11,21), POINT(11, 0), }, [2] = { POINT( 4,16), POINT( 4,17), POINT( 5,19), POINT( 6,20), POINT( 8,21), POINT(12,21), POINT(14,20), POINT(15,19), POINT(16,17), POINT(16,15), POINT(15,13), POINT(13,10), POINT( 3, 0), POINT(17, 0), }, [3] = { POINT( 5,21), POINT(16,21), POINT(10,13), POINT(13,13), POINT(15,12), POINT(16,11), POINT(17, 8), POINT(17, 6), POINT(16, 3), POINT(14, 1), POINT(11, 0), POINT( 8, 0), POINT( 5, 1), POINT( 4, 2), POINT( 3, 4), }, [4] = { POINT(13,21), POINT( 3, 7), POINT(18, 7), POINT(-1,-1), POINT(13,21), POINT(13, 0), }, [5] = { POINT(15,21), POINT( 5,21), POINT( 4,12), POINT( 5,13), POINT( 8,14), POINT(11,14), POINT(14,13), POINT(16,11), POINT(17, 8), POINT(17, 6), POINT(16, 3), POINT(14, 1), POINT(11, 0), POINT( 8, 0), POINT( 5, 1), POINT( 4, 2), POINT( 3, 4), }, [6] = { POINT(16,18), POINT(15,20), POINT(12,21), POINT(10,21), POINT( 7,20), POINT( 5,17), POINT( 4,12), POINT( 4, 7), POINT( 5, 3), POINT( 7, 1), POINT(10, 0), POINT(11, 0), POINT(14, 1), POINT(16, 3), POINT(17, 6), POINT(17, 7), POINT(16,10), POINT(14,12), POINT(11,13), POINT(10,13), POINT( 7,12), POINT( 5,10), POINT( 4, 7), }, [7] = { POINT(17,21), POINT( 7, 0), POINT(-1,-1), POINT( 3,21), POINT(17,21), }, [8] = { POINT( 8,21), POINT( 5,20), POINT( 4,18), POINT( 4,16), POINT( 5,14), POINT( 7,13), POINT(11,12), POINT(14,11), POINT(16, 9), POINT(17, 7), POINT(17, 4), POINT(16, 2), POINT(15, 1), POINT(12, 0), POINT( 8, 0), POINT( 5, 1), POINT( 4, 2), POINT( 3, 4), POINT( 3, 7), POINT( 4, 9), POINT( 6,11), POINT( 9,12), POINT(13,13), POINT(15,14), POINT(16,16), POINT(16,18), POINT(15,20), POINT(12,21), POINT( 8,21), }, [9] = { POINT(16,14), POINT(15,11), POINT(13, 9), POINT(10, 8), POINT( 9, 8), POINT( 6, 9), POINT( 4,11), POINT( 3,14), POINT( 3,15), POINT( 4,18), POINT( 6,20), POINT( 9,21), POINT(10,21), POINT(13,20), POINT(15,18), POINT(16,14), POINT(16, 9), POINT(15, 4), POINT(13, 1), POINT(10, 0), POINT( 8, 0), POINT( 5, 1), POINT( 4, 3), }, }; ```