// Minimalist5ptFont_Oli Version 05. /* Manually created by OlivierFlying747-8 https://fredrik.hubbe.net/lightsaber/proffieos.html Copyright (c) 2016-2025 Fredrik Hubinette Copyright (c) 2025 OlivierFlying747-8 (Apologies for only adding my username, I would like to remain "anonymous" for the time being) With contributions by: Fredrik Hubinette aka profezzorn, In case of problems, you can find us at: https://crucible.hubbe.net where somebody will be there to help. Distributed under the terms of the GNU General Public License v3. https://www.gnu.org/licenses/ Smallest possible but still readable text font for OLED, each character is maximum 5 pixels tall x 5 (6) pixels wide, but the majority of digits and alphabet characters are 5 tall x 3 wide. The idea is to have a text font with a minimalist flash-memory footprint for a text based menu system. Characters supported: - Digits from 0 to 9. - Latin alphabet (all caps only) from A to Z. - Limited punctuation & special characters (let me know if you need me to add more). '@', '$', '£', '€', '§' not supported, because they would be taller than 5 pixels to look good enough, I think. However if you come up with a "pretty enough" design, I might accommodate. */ // Digits from '0' to '9': const uint8_t Basic5pt7bChar0[] = { // 0x30 '0' 0b01110UL, 0b10001UL, 0b01110UL, }; const uint8_t Basic5pt7bChar1[] = { // 0x31 '1' 0b10010UL, 0b11111UL, 0b10000UL, }; const uint8_t Basic5pt7bChar2[] = { // 0x32 '2' 0b10010UL, 0b11001UL, 0b10111UL, }; const uint8_t Basic5pt7bChar3[] = { // 0x33 '3' 0b10001UL, 0b10101UL, 0b01010UL, }; const uint8_t Basic5pt7bChar4[] = { // 0x34 '4' 0b00111UL, 0b00100UL, 0b11111UL, }; const uint8_t Basic5pt7bChar5[] = { // 0x35 '5' 0b10111UL, 0b10101UL, 0b01001UL, }; const uint8_t Basic5pt7bChar6[] = { // 0x36 '6' 0b11110UL, 0b10101UL, 0b11101UL, }; const uint8_t Basic5pt7bChar7[] = { // 0x37 '7' 0b11001UL, 0b00101UL, 0b00011UL, }; const uint8_t Basic5pt7bChar8[] = { // 0x38 '8' 0b11111UL, // '8' could also be: 0b01010UL, 0b10101UL, // not sure if >round 0b10101UL, 0b11111UL, // or ' 0b10001UL, 0b01010UL, 0b00100UL, }; const uint8_t Basic5pt7bChar54[] = { // 0x3F '?' 0b00010UL, 0b00001UL, 0b10101UL, 0b00010UL, }; const uint8_t Basic5pt7bChar55[] = { // 0x5B '[' 0b11111UL, 0b10001UL, }; const uint8_t Basic5pt7bChar56[] = { // 0x5C '\' 0b00011UL, 0b00100UL, 0b11000UL, }; const uint8_t Basic5pt7bChar57[] = { // 0x5D ']' 0b10001UL, 0b11111UL, }; const uint8_t Basic5pt7bChar58[] = { // 0x5E '^' (up pointing arrow) 0b100UL, 0b010UL, 0b001UL, 0b010UL, 0b100UL, }; const uint8_t Basic5pt7bChar59[] = { // 0x5F '_' 0b1UL, 0b1UL, 0b1UL, 0b1UL, }; const uint8_t Basic5pt7bChar60[] = { // 0x76 'v' ("fat" lower case 'v' for down pointing arrow) 0b001UL, 0b010UL, 0b100UL, 0b010UL, 0b001UL, }; const uint8_t Basic5pt7bChar61[] = { // 0x7C '|' 0b11111UL, }; const Glyph Basic5pt7bGlyphs[] = { // Digits '0' to '9'. { 3, 1, -4, GLYPHDATA(Basic5pt7bChar0) }, // 0x30 '0' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar1) }, // 0x31 '1' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar2) }, // 0x32 '2' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar3) }, // 0x33 '3' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar4) }, // 0x34 '4' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar5) }, // 0x35 '5' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar6) }, // 0x36 '6' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar7) }, // 0x37 '7' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar8) }, // 0x38 '8' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar9) }, // 0x39 '9' // Latin alphabet (Upper case (CAPS) only) 'A' to 'Z'. { 3, 1, -4, GLYPHDATA(Basic5pt7bCharAa) }, // 0x41 'A', 0x61 'a' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharBb) }, // 0x42 'B', 0x62 'b' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharCc) }, // 0x43 'C', 0x63 'c' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharDd) }, // 0x44 'D', 0x64 'd' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharEe) }, // 0x45 'E', 0x65 'e' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharFf) }, // 0x46 'F', 0x66 'f' { 5, 4, -4, GLYPHDATA(Basic5pt7bCharGg) }, // 0x47 'G', 0x67 'g' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharHh) }, // 0x48 'H', 0x68 'h' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharIi) }, // 0x49 'I', 0x69 'i' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharJj) }, // 0x4A 'J', 0x6A 'j' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharKk) }, // 0x4B 'K', 0x6B 'k' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharLl) }, // 0x4C 'L', 0x6C 'l' { 5, 1, -4, GLYPHDATA(Basic5pt7bCharMm) }, // 0x4D 'M', 0x6D 'm' { 4, 1, -4, GLYPHDATA(Basic5pt7bCharNn) }, // 0x4E 'N', 0x6E 'n' { 4, 1, -4, GLYPHDATA(Basic5pt7bCharOo) }, // 0x4F 'O', 0x6F 'o' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharPp) }, // 0x50 'P', 0x70 'p' { 5, 1, -4, GLYPHDATA(Basic5pt7bCharQq) }, // 0x51 'Q', 0x71 'q' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharRr) }, // 0x52 'R', 0x72 'r' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharSs) }, // 0x53 'S', 0x73 's' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharTt) }, // 0x54 'T', 0x74 't' { 4, 1, -4, GLYPHDATA(Basic5pt7bCharUu) }, // 0x55 'U', 0x75 'u' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharVv) }, // 0x56 'V', 0x76 'v' { 5, 5, -4, GLYPHDATA(Basic5pt7bCharWw) }, // 0x57 'W', 0x77 'w' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharXx) }, // 0x58 'X', 0x78 'x' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharYy) }, // 0x59 'Y', 0x79 'y' { 3, 1, -4, GLYPHDATA(Basic5pt7bCharZz) }, // 0x5A 'Z', 0x7A 'z' /* Some punctuation and the most important special characters only (let me know if I missed any - '@' & '$' would be too big to look good on a max 5 pixel tall format, I think!) */ { 1, 1, -4, GLYPHDATA(Basic5pt7bChar36) }, // 0x20 ' ' (space) { 1, 1, -4, GLYPHDATA(Basic5pt7bChar37) }, // 0x21 '!' { 5, 1, -4, GLYPHDATA(Basic5pt7bChar38) }, // 0x23 '#' { 5, 1, -4, GLYPHDATA(Basic5pt7bChar39) }, // 0x25 '%' //{ 5, .., -4, GLYPHDATA(Basic5pt7bChar40) }, // 0x26 '&' (I don't know yet how to draw this on 5x5 or 5x6 ?) { 1, 1, -1, GLYPHDATA(Basic5pt7bChar41) }, // 0x27 ''' { 2, 1, -4, GLYPHDATA(Basic5pt7bChar42) }, // 0x28 '(' { 2, 1, -4, GLYPHDATA(Basic5pt7bChar43) }, // 0x29 ')' { 3, 1, -3, GLYPHDATA(Basic5pt7bChar44) }, // 0x2A '*' (but using symbol for 0x78 'x' instead) { 3, 1, -3, GLYPHDATA(Basic5pt7bChar45) }, // 0x2B '+' { 2, 1, -4, GLYPHDATA(Basic5pt7bChar46) }, // 0x2C ',' { 3, 1, -3, GLYPHDATA(Basic5pt7bChar47) }, // 0x2D '-' { 1, 1, -4, GLYPHDATA(Basic5pt7bChar48) }, // 0x2E '.' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar49) }, // 0x2F '/' { 3, 1, -3, GLYPHDATA(Basic5pt7bChar50) }, // 0x3A ':' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar51) }, // 0x3C '<' { 3, 3, -3, GLYPHDATA(Basic5pt7bChar52) }, // 0x3D '=' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar53) }, // 0x3E '>' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar54) }, // 0x3F '?' { 2, 1, -4, GLYPHDATA(Basic5pt7bChar55) }, // 0x5B '[' { 3, 1, -4, GLYPHDATA(Basic5pt7bChar56) }, // 0x5C '\' { 2, 1, -4, GLYPHDATA(Basic5pt7bChar57) }, // 0x5D ']' { 3, 5, -2, GLYPHDATA(Basic5pt7bChar58) }, // 0x5E '^' (up pointing arrow) { 4, 0, -4, GLYPHDATA(Basic5pt7bChar59) }, // 0x5F '_' (under-score) { 1, 1, -4, GLYPHDATA(Basic5pt7bChar60) }, // 0x7C '|' { 5, 1, -4, GLYPHDATA(Basic5pt7bChar61) }, // 0x76 'v' ("fat" lower case 'v'" for down pointing arrow) };