forked from Bodmer/TFT_eSPI
Fixes for hiroschima font
This commit is contained in:
@@ -2618,7 +2618,7 @@ void TFT_eSprite::printToSprite(std::string_view string)
|
|||||||
** Function name: printToSprite
|
** Function name: printToSprite
|
||||||
** Description: Write a string to the sprite cursor position
|
** Description: Write a string to the sprite cursor position
|
||||||
***************************************************************************************/
|
***************************************************************************************/
|
||||||
void TFT_eSprite::printToSprite(char *cbuffer, uint16_t len) //std::string_view string)
|
void TFT_eSprite::printToSprite(const char *cbuffer, uint16_t len) //std::string_view string)
|
||||||
{
|
{
|
||||||
if(!fontLoaded) return;
|
if(!fontLoaded) return;
|
||||||
|
|
||||||
|
@@ -144,6 +144,7 @@ class TFT_eSprite : public TFT_eSPI {
|
|||||||
// Print string to sprite using loaded font at cursor position
|
// Print string to sprite using loaded font at cursor position
|
||||||
void printToSprite(std::string_view string);
|
void printToSprite(std::string_view string);
|
||||||
// Print indexed glyph to sprite using loaded font at x,y
|
// Print indexed glyph to sprite using loaded font at x,y
|
||||||
|
void printToSprite(const char *cbuffer, uint16_t len);
|
||||||
int16_t printToSprite(int16_t x, int16_t y, uint16_t index);
|
int16_t printToSprite(int16_t x, int16_t y, uint16_t index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -135,9 +135,9 @@ SPI3_HOST = 2
|
|||||||
#ifdef SMOOTH_FONT
|
#ifdef SMOOTH_FONT
|
||||||
// Call up the SPIFFS (SPI FLASH Filing System) for the anti-aliased fonts
|
// Call up the SPIFFS (SPI FLASH Filing System) for the anti-aliased fonts
|
||||||
#define FS_NO_GLOBALS
|
#define FS_NO_GLOBALS
|
||||||
#include <FS.h>
|
//#include <FS.h>
|
||||||
#include "SPIFFS.h" // ESP32 only
|
//#include "SPIFFS.h" // ESP32 only
|
||||||
#define FONT_FS_AVAILABLE
|
//#define FONT_FS_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -5041,7 +5041,7 @@ int16_t TFT_eSPI::drawString(std::string_view string, int32_t poX, int32_t poY,
|
|||||||
if (padX && !_fillbg) _fillbg = true;
|
if (padX && !_fillbg) _fillbg = true;
|
||||||
|
|
||||||
while (n < len) {
|
while (n < len) {
|
||||||
uint16_t uniCode = decodeUTF8((uint8_t*)ptr, &n, len - n);
|
uint16_t uniCode = decodeUTF8((const uint8_t*)std::begin(string), &n, len - n);
|
||||||
drawGlyph(uniCode);
|
drawGlyph(uniCode);
|
||||||
}
|
}
|
||||||
_fillbg = fillbg; // restore state
|
_fillbg = fillbg; // restore state
|
||||||
|
Reference in New Issue
Block a user