acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
Free_Fonts.h (9056B)
1 // Attach this header file to your sketch to use the GFX Free Fonts. You can write 2 // sketches without it, but it makes referencing them easier. 3 4 // This calls up ALL the fonts but they only get loaded if you actually 5 // use them in your sketch. 6 // 7 // No changes are needed to this header file unless new fonts are added to the 8 // library "Fonts/GFXFF" folder. 9 // 10 // To save a lot of typing long names, each font can easily be referenced in the 11 // sketch in three ways, either with: 12 // 13 // 1. Font file name with the & in front such as &FreeSansBoldOblique24pt7b 14 // an example being: 15 // 16 // tft.setFreeFont(&FreeSansBoldOblique24pt7b); 17 // 18 // 2. FF# where # is a number determined by looking at the list below 19 // an example being: 20 // 21 // tft.setFreeFont(FF32); 22 // 23 // 3. An abbreviation of the file name. Look at the list below to see 24 // the abbreviations used, for example: 25 // 26 // tft.setFreeFont(FSSBO24) 27 // 28 // Where the letters mean: 29 // F = Free font 30 // M = Mono 31 // SS = Sans Serif (double S to distinguish is form serif fonts) 32 // S = Serif 33 // B = Bold 34 // O = Oblique (letter O not zero) 35 // I = Italic 36 // # = point size, either 9, 12, 18 or 24 37 // 38 // Setting the font to NULL will select the GLCD font: 39 // 40 // tft.setFreeFont(NULL); // Set font to GLCD 41 42 #define LOAD_GFXFF 43 44 #ifdef LOAD_GFXFF // Only include the fonts if LOAD_GFXFF is defined in User_Setup.h 45 46 // Use these when printing or drawing text in GLCD and high rendering speed fonts 47 #define GFXFF 1 48 #define GLCD 0 49 #define FONT2 2 50 #define FONT4 4 51 #define FONT6 6 52 #define FONT7 7 53 #define FONT8 8 54 55 // Use the following when calling setFont() 56 // 57 // Reserved for GLCD font // FF0 58 // 59 60 #define TT1 &TomThumb 61 62 #define FM9 &FreeMono9pt7b 63 #define FM12 &FreeMono12pt7b 64 #define FM18 &FreeMono18pt7b 65 #define FM24 &FreeMono24pt7b 66 67 #define FMB9 &FreeMonoBold9pt7b 68 #define FMB12 &FreeMonoBold12pt7b 69 #define FMB18 &FreeMonoBold18pt7b 70 #define FMB24 &FreeMonoBold24pt7b 71 72 #define FMO9 &FreeMonoOblique9pt7b 73 #define FMO12 &FreeMonoOblique12pt7b 74 #define FMO18 &FreeMonoOblique18pt7b 75 #define FMO24 &FreeMonoOblique24pt7b 76 77 #define FMBO9 &FreeMonoBoldOblique9pt7b 78 #define FMBO12 &FreeMonoBoldOblique12pt7b 79 #define FMBO18 &FreeMonoBoldOblique18pt7b 80 #define FMBO24 &FreeMonoBoldOblique24pt7b 81 82 #define FSS9 &FreeSans9pt7b 83 #define FSS12 &FreeSans12pt7b 84 #define FSS18 &FreeSans18pt7b 85 #define FSS24 &FreeSans24pt7b 86 87 #define FSSB9 &FreeSansBold9pt7b 88 #define FSSB12 &FreeSansBold12pt7b 89 #define FSSB18 &FreeSansBold18pt7b 90 #define FSSB24 &FreeSansBold24pt7b 91 92 #define FSSO9 &FreeSansOblique9pt7b 93 #define FSSO12 &FreeSansOblique12pt7b 94 #define FSSO18 &FreeSansOblique18pt7b 95 #define FSSO24 &FreeSansOblique24pt7b 96 97 #define FSSBO9 &FreeSansBoldOblique9pt7b 98 #define FSSBO12 &FreeSansBoldOblique12pt7b 99 #define FSSBO18 &FreeSansBoldOblique18pt7b 100 #define FSSBO24 &FreeSansBoldOblique24pt7b 101 102 #define FS9 &FreeSerif9pt7b 103 #define FS12 &FreeSerif12pt7b 104 #define FS18 &FreeSerif18pt7b 105 #define FS24 &FreeSerif24pt7b 106 107 #define FSI9 &FreeSerifItalic9pt7b 108 #define FSI12 &FreeSerifItalic12pt7b 109 #define FSI19 &FreeSerifItalic18pt7b 110 #define FSI24 &FreeSerifItalic24pt7b 111 112 #define FSB9 &FreeSerifBold9pt7b 113 #define FSB12 &FreeSerifBold12pt7b 114 #define FSB18 &FreeSerifBold18pt7b 115 #define FSB24 &FreeSerifBold24pt7b 116 117 #define FSBI9 &FreeSerifBoldItalic9pt7b 118 #define FSBI12 &FreeSerifBoldItalic12pt7b 119 #define FSBI18 &FreeSerifBoldItalic18pt7b 120 #define FSBI24 &FreeSerifBoldItalic24pt7b 121 122 #define FF0 NULL //ff0 reserved for GLCD 123 #define FF1 &FreeMono9pt7b 124 #define FF2 &FreeMono12pt7b 125 #define FF3 &FreeMono18pt7b 126 #define FF4 &FreeMono24pt7b 127 128 #define FF5 &FreeMonoBold9pt7b 129 #define FF6 &FreeMonoBold12pt7b 130 #define FF7 &FreeMonoBold18pt7b 131 #define FF8 &FreeMonoBold24pt7b 132 133 #define FF9 &FreeMonoOblique9pt7b 134 #define FF10 &FreeMonoOblique12pt7b 135 #define FF11 &FreeMonoOblique18pt7b 136 #define FF12 &FreeMonoOblique24pt7b 137 138 #define FF13 &FreeMonoBoldOblique9pt7b 139 #define FF14 &FreeMonoBoldOblique12pt7b 140 #define FF15 &FreeMonoBoldOblique18pt7b 141 #define FF16 &FreeMonoBoldOblique24pt7b 142 143 #define FF17 &FreeSans9pt7b 144 #define FF18 &FreeSans12pt7b 145 #define FF19 &FreeSans18pt7b 146 #define FF20 &FreeSans24pt7b 147 148 #define FF21 &FreeSansBold9pt7b 149 #define FF22 &FreeSansBold12pt7b 150 #define FF23 &FreeSansBold18pt7b 151 #define FF24 &FreeSansBold24pt7b 152 153 #define FF25 &FreeSansOblique9pt7b 154 #define FF26 &FreeSansOblique12pt7b 155 #define FF27 &FreeSansOblique18pt7b 156 #define FF28 &FreeSansOblique24pt7b 157 158 #define FF29 &FreeSansBoldOblique9pt7b 159 #define FF30 &FreeSansBoldOblique12pt7b 160 #define FF31 &FreeSansBoldOblique18pt7b 161 #define FF32 &FreeSansBoldOblique24pt7b 162 163 #define FF33 &FreeSerif9pt7b 164 #define FF34 &FreeSerif12pt7b 165 #define FF35 &FreeSerif18pt7b 166 #define FF36 &FreeSerif24pt7b 167 168 #define FF37 &FreeSerifItalic9pt7b 169 #define FF38 &FreeSerifItalic12pt7b 170 #define FF39 &FreeSerifItalic18pt7b 171 #define FF40 &FreeSerifItalic24pt7b 172 173 #define FF41 &FreeSerifBold9pt7b 174 #define FF42 &FreeSerifBold12pt7b 175 #define FF43 &FreeSerifBold18pt7b 176 #define FF44 &FreeSerifBold24pt7b 177 178 #define FF45 &FreeSerifBoldItalic9pt7b 179 #define FF46 &FreeSerifBoldItalic12pt7b 180 #define FF47 &FreeSerifBoldItalic18pt7b 181 #define FF48 &FreeSerifBoldItalic24pt7b 182 183 // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 184 // Now we define "s"tring versions for easy printing of the font name so: 185 // tft.println(sFF5); 186 // will print 187 // Mono bold 9 188 // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 189 190 #define sFF0 "GLCD" 191 #define sTT1 "Tom Thumb" 192 #define sFF1 "Mono 9" 193 #define sFF2 "Mono 12" 194 #define sFF3 "Mono 18" 195 #define sFF4 "Mono 24" 196 197 #define sFF5 "Mono bold 9" 198 #define sFF6 "Mono bold 12" 199 #define sFF7 "Mono bold 18" 200 #define sFF8 "Mono bold 24" 201 202 #define sFF9 "Mono oblique 9" 203 #define sFF10 "Mono oblique 12" 204 #define sFF11 "Mono oblique 18" 205 #define sFF12 "Mono oblique 24" 206 207 #define sFF13 "Mono bold oblique 9" 208 #define sFF14 "Mono bold oblique 12" 209 #define sFF15 "Mono bold oblique 18" 210 #define sFF16 "Mono bold oblique 24" // Full text line is too big for 480 pixel wide screen 211 212 #define sFF17 "Sans 9" 213 #define sFF18 "Sans 12" 214 #define sFF19 "Sans 18" 215 #define sFF20 "Sans 24" 216 217 #define sFF21 "Sans bold 9" 218 #define sFF22 "Sans bold 12" 219 #define sFF23 "Sans bold 18" 220 #define sFF24 "Sans bold 24" 221 222 #define sFF25 "Sans oblique 9" 223 #define sFF26 "Sans oblique 12" 224 #define sFF27 "Sans oblique 18" 225 #define sFF28 "Sans oblique 24" 226 227 #define sFF29 "Sans bold oblique 9" 228 #define sFF30 "Sans bold oblique 12" 229 #define sFF31 "Sans bold oblique 18" 230 #define sFF32 "Sans bold oblique 24" 231 232 #define sFF33 "Serif 9" 233 #define sFF34 "Serif 12" 234 #define sFF35 "Serif 18" 235 #define sFF36 "Serif 24" 236 237 #define sFF37 "Serif italic 9" 238 #define sFF38 "Serif italic 12" 239 #define sFF39 "Serif italic 18" 240 #define sFF40 "Serif italic 24" 241 242 #define sFF41 "Serif bold 9" 243 #define sFF42 "Serif bold 12" 244 #define sFF43 "Serif bold 18" 245 #define sFF44 "Serif bold 24" 246 247 #define sFF45 "Serif bold italic 9" 248 #define sFF46 "Serif bold italic 12" 249 #define sFF47 "Serif bold italic 18" 250 #define sFF48 "Serif bold italic 24" 251 252 #else // LOAD_GFXFF not defined so setup defaults to prevent error messages 253 254 // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 255 // Free fonts are not loaded in User_Setup.h so we must define all as font 1 256 // to prevent compile error messages 257 // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 258 259 #define GFXFF 1 260 #define GLCD 1 261 #define FONT2 2 262 #define FONT4 4 263 #define FONT6 6 264 #define FONT7 7 265 #define FONT8 8 266 267 #define FF0 1 268 #define FF1 1 269 #define FF2 1 270 #define FF3 1 271 #define FF4 1 272 #define FF5 1 273 #define FF6 1 274 #define FF7 1 275 #define FF8 1 276 #define FF9 1 277 #define FF10 1 278 #define FF11 1 279 #define FF12 1 280 #define FF13 1 281 #define FF14 1 282 #define FF15 1 283 #define FF16 1 284 #define FF17 1 285 #define FF18 1 286 #define FF19 1 287 #define FF20 1 288 #define FF21 1 289 #define FF22 1 290 #define FF23 1 291 #define FF24 1 292 #define FF25 1 293 #define FF26 1 294 #define FF27 1 295 #define FF28 1 296 #define FF29 1 297 #define FF30 1 298 #define FF31 1 299 #define FF32 1 300 #define FF33 1 301 #define FF34 1 302 #define FF35 1 303 #define FF36 1 304 #define FF37 1 305 #define FF38 1 306 #define FF39 1 307 #define FF40 1 308 #define FF41 1 309 #define FF42 1 310 #define FF43 1 311 #define FF44 1 312 #define FF45 1 313 #define FF46 1 314 #define FF47 1 315 #define FF48 1 316 317 #define FM9 1 318 #define FM12 1 319 #define FM18 1 320 #define FM24 1 321 322 #define FMB9 1 323 #define FMB12 1 324 #define FMB18 1 325 #define FMB24 1 326 327 #define FMO9 1 328 #define FMO12 1 329 #define FMO18 1 330 #define FMO24 1 331 332 #define FMBO9 1 333 #define FMBO12 1 334 #define FMBO18 1 335 #define FMBO24 1 336 337 #define FSS9 1 338 #define FSS12 1 339 #define FSS18 1 340 #define FSS24 1 341 342 #define FSSB9 1 343 #define FSSB12 1 344 #define FSSB18 1 345 #define FSSB24 1 346 347 #define FSSO9 1 348 #define FSSO12 1 349 #define FSSO18 1 350 #define FSSO24 1 351 352 #define FSSBO9 1 353 #define FSSBO12 1 354 #define FSSBO18 1 355 #define FSSBO24 1 356 357 #define FS9 1 358 #define FS12 1 359 #define FS18 1 360 #define FS24 1 361 362 #define FSI9 1 363 #define FSI12 1 364 #define FSI19 1 365 #define FSI24 1 366 367 #define FSB9 1 368 #define FSB12 1 369 #define FSB18 1 370 #define FSB24 1 371 372 #define FSBI9 1 373 #define FSBI12 1 374 #define FSBI18 1 375 #define FSBI24 1 376 377 #endif // LOAD_GFXFF