diff options
Diffstat (limited to 'src/displayapp/screens/Symbols.h')
| -rw-r--r-- | src/displayapp/screens/Symbols.h | 76 |
1 files changed, 70 insertions, 6 deletions
diff --git a/src/displayapp/screens/Symbols.h b/src/displayapp/screens/Symbols.h index 928bcd7..faca4da 100644 --- a/src/displayapp/screens/Symbols.h +++ b/src/displayapp/screens/Symbols.h @@ -1,16 +1,80 @@ #pragma once + // For neofont: + // Layout for 3-byte codes: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // U+F0000: 11110011 10110000 000000 000000 + // Neofont glyph: 11110011 10110zzz zzzzyy yyyyyy + // CDD DEEEAA ABBBCC + // \xF3 \xB[0-7] \x[8-B]. \x[8-B]. + // "\xF3\xB5\x80\x97" + +// h + (g<<1) + (f<<2) + (e<<3) + (d << 4) + (c << 5) + (b << 6) + (a << 7), \ +// 0 + (o<<1) + (n<<2) + (m<<3) + (l << 4) + (k << 5) + (j << 6) + (i << 7) \ + +#define G( \ + a,b,c, \ + d,e,f, \ + g,h,i, \ + j,k,l, \ + m,n,o \ +) { \ + 0xF3, \ + 0xB0 | (i<<2) | (j << 1) | k, \ + 0xB0 | (l<<5) | (m<<4) | (n<<3) | (o<<2) | (a<<1) | b, \ + 0xB0 | (c<<5) | (d<<4) | (e<<3) | (f<<2) | (g<<1) | h, \ + 0 \ +} + +#define X 1 +#define _ 0 + namespace Pinetime { namespace Applications { namespace Screens { namespace Symbols { static constexpr const char* none = ""; - static constexpr const char* batteryFull = "\xEF\x89\x80"; - static constexpr const char* batteryEmpty = "\xEF\x89\x84"; - static constexpr const char* batteryThreeQuarter = "\xEF\x89\x81"; - static constexpr const char* batteryHalf = "\xEF\x89\x82"; - static constexpr const char* batteryOneQuarter = "\xEF\x89\x83"; - static constexpr const char* heartBeat = "\xEF\x88\x9E"; + static constexpr const char* batteryFull = + // "\xEF\x89\x80"; + G(_, X, _, + X, X, X, + X, X, X, + X, X, X, + X, X, X); + static constexpr const char* batteryEmpty = + // "\xEF\x89\x84"; + G(_, X, _, + X, _, X, + X, _, X, + X, _, X, + X, X, X); + static constexpr const char* batteryThreeQuarter = + // Was: "\xEF\x89\x81"; + G(_, X, _, + X, X, X, + X, _, X, + X, X, X, + X, X, X); + static constexpr const char* batteryHalf = + // Was: "\xEF\x89\x82"; + G(_, X, _, + X, _, X, + X, X, X, + X, X, X, + X, X, X); + static constexpr const char* batteryOneQuarter = + // Was: "\xEF\x89\x83"; + G(_, X, _, + X, _, X, + X, _, X, + X, X, X, + X, X, X); + static constexpr const char* heartBeat = + // Was: "\xEF\x88\x9E" + G(_, _, _, + X, _, X, + X, X, X, + _, X, _, + _, _, _); static constexpr const char* bluetoothFull = "\xEF\x8A\x93"; static constexpr const char* bluetooth = "\xEF\x8A\x94"; static constexpr const char* plug = "\xEF\x87\xA6"; |
