From 52f3186da9919c8cd8ac826f60d18a82d2100293 Mon Sep 17 00:00:00 2001 From: Bodmer Date: Mon, 6 Dec 2021 00:41:23 +0000 Subject: [PATCH] =?UTF-8?q?#1314=20Re-instate=20$=20symbol=20with=20option?= =?UTF-8?q?s=20to=20replace=20with=20=C2=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In setup add: #define FONT_4_GBP To replace $ with £ in font 4 --- Fonts/Font32rle.c | 19 +++++++++++++++++++ TFT_eSPI.h | 2 +- library.json | 2 +- library.properties | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Fonts/Font32rle.c b/Fonts/Font32rle.c index 321ec86..f163986 100644 --- a/Fonts/Font32rle.c +++ b/Fonts/Font32rle.c @@ -4,6 +4,8 @@ // // This font contains 96 ASCII characters +// Use the #define below to select a GBP sign instead of a dollar sign +//#define FONT_4_GBP PROGMEM const unsigned char widtbl_f32[96] = // character width table { @@ -58,6 +60,8 @@ PROGMEM const unsigned char chr_f32_23[] = 0x7F, 0xD }; +#ifdef FONT_4_GBP +// GBP symbol PROGMEM const unsigned char chr_f32_24[] = { 0x1F, 0x85, 0x05, 0x89, 0x03, 0x82, 0x03, 0x82, @@ -67,6 +71,21 @@ PROGMEM const unsigned char chr_f32_24[] = 0x0A, 0x81, 0x0B, 0x86, 0x02, 0x80, 0x01, 0x8B, 0x01, 0x81, 0x04, 0x83, 0x63 }; +#else +// Dollar symbol +PROGMEM const unsigned char chr_f32_24[] = +{ +0x14, 0x80, 0x0A, 0x83, 0x07, 0x87, 0x04, 0x82, +0x01, 0x80, 0x00, 0x82, 0x03, 0x81, 0x02, 0x80, +0x01, 0x81, 0x03, 0x81, 0x02, 0x80, 0x01, 0x82, +0x02, 0x82, 0x01, 0x80, 0x08, 0x84, 0x09, 0x84, +0x0B, 0x83, 0x09, 0x84, 0x08, 0x80, 0x01, 0x82, +0x01, 0x82, 0x02, 0x80, 0x02, 0x81, 0x02, 0x81, +0x02, 0x80, 0x02, 0x81, 0x02, 0x83, 0x00, 0x80, +0x01, 0x82, 0x03, 0x88, 0x06, 0x84, 0x0A, 0x80, +0x67 +}; +#endif PROGMEM const unsigned char chr_f32_25[] = { diff --git a/TFT_eSPI.h b/TFT_eSPI.h index 168f11c..3f84349 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -16,7 +16,7 @@ #ifndef _TFT_eSPIH_ #define _TFT_eSPIH_ -#define TFT_ESPI_VERSION "2.3.86" +#define TFT_ESPI_VERSION "2.3.87" // Bit level feature flags // Bit 0 set: viewport capability diff --git a/library.json b/library.json index 162bf00..4cd40eb 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "2.3.86", + "version": "2.3.87", "keywords": "Arduino, tft, ePaper, display, Pico, RP2040, STM32, ESP8266, NodeMCU, ESP32, M5Stack, ILI9341, ST7735, ILI9163, S6D02A1, ILI9481, ILI9486, ILI9488, ST7789, RM68140, SSD1351, SSD1963, ILI9225, HX8357D", "description": "A TFT and ePaper SPI graphics library with optimisation for Raspberry Pi Pico, ESP8266, ESP32 and STM32", "repository": diff --git a/library.properties b/library.properties index 9746c2e..61f4855 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=2.3.86 +version=2.3.87 author=Bodmer maintainer=Bodmer sentence=TFT graphics library for Arduino processors with performance optimisation for RP2040, STM32, ESP8266 and ESP32