From bacd1988323ff8cc4035e2e11b481a7afa136c7c Mon Sep 17 00:00:00 2001 From: Bodmer Date: Fri, 7 Jul 2017 23:52:01 +0100 Subject: [PATCH] Free font bounding box correction 1 pixel correctio for background bounding box determination --- TFT_eSPI.cpp | 4 ++-- library.json | 2 +- library.properties | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index d981239..d805ade 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -2370,7 +2370,7 @@ void TFT_eSPI::pushColors(uint8_t *data, uint32_t len) // Bresenham's algorithm - thx wikipedia - speed enhanced by Bodmer to use // an eficient FastH/V Line draw routine for line segments of 2 pixels or more -#if defined (ESP32) || defined (RPI_WRITE_STROBE) +#if defined (RPI_ILI9486_DRIVER) || defined (ESP32) || defined (RPI_WRITE_STROBE) void TFT_eSPI::drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint32_t color) { @@ -3264,7 +3264,7 @@ int16_t TFT_eSPI::drawString(const char *string, int poX, int poY, int font) if ((font == 1) && (gfxFont)) { poX +=xo; // Adjust for negative offset start character - poY -= 1 + glyph_ab * textsize; + poY -= glyph_ab * textsize; } #endif switch(padding) { diff --git a/library.json b/library.json index 2be6006..6696ff4 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "TFT_eSPI", - "version": "0.16.13", + "version": "0.16.14", "keywords": "TFT, ESP8266, NodeMCU, ESP32, ILI9341, ST7735, ILI9163, S6D02A1, ILI9486", "description": "A TFT SPI graphics library for ESP8266", "repository": diff --git a/library.properties b/library.properties index 2930c7c..6150dea 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TFT_eSPI -version=0.16.13 +version=0.16.14 author=Bodmer maintainer=Bodmer sentence=A fast TFT library for ESP8266 processors and the Arduino IDE