|
13 | 13 |
|
14 | 14 | #define TCUNICODE_API_VERSION 2 |
15 | 15 |
|
16 | | -#if !defined(pgm_read_dword) && (defined(__MBED__) || defined(BUILD_FOR_PICO_CMAKE) || defined(BUILD_FOR_STM32CUBE_CMAKE) || defined(BUILD_FOR_NATIVE_PLATFORM)) |
| 16 | +#if !defined(pgm_read_dword) && (defined(__MBED__) || defined(BUILD_FOR_PICO_CMAKE) || defined(BUILD_FOR_STM32CUBE_CMAKE) || defined(BUILD_FOR_NATIVE_PLATFORM) || defined(BUILD_FOR_ESP32_IDF)) |
17 | 17 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) |
18 | 18 | #define pgm_read_word(addr) (*(const unsigned short *)(addr)) |
19 | 19 | #define pgm_read_dword(addr) (*(const unsigned long *)(addr)) |
@@ -132,14 +132,14 @@ class GlyphWithBitmap { |
132 | 132 |
|
133 | 133 | void handleUtf8Drawing(void *userData, uint32_t ch); |
134 | 134 |
|
135 | | -#if __has_include (<Print.h>) || defined(ARDUINO_SAM_DUE) |
| 135 | +#if (__has_include (<Print.h>) || defined(ARDUINO_SAM_DUE)) && !defined(BUILD_FOR_ESP32_IDF) |
136 | 136 | #include <Print.h> |
137 | 137 | class UnicodeFontHandler : public Print { |
138 | 138 | #elif __has_include(<PrintCompat.h>) |
139 | 139 | #include <PrintCompat.h> |
140 | 140 | class UnicodeFontHandler : public Print { |
141 | 141 | #else |
142 | | -class UnicodeFontHandler { |
| 142 | +#error "Either Print.h or PrintCompat.h must be included, cannot build." |
143 | 143 | #endif |
144 | 144 |
|
145 | 145 | public: |
@@ -252,7 +252,7 @@ class UnicodeFontHandler { |
252 | 252 | */ |
253 | 253 | Coord textExtents_P(const char *text, int *baseline) { return textExtents(text, baseline, true); } |
254 | 254 |
|
255 | | -#if !defined(__MBED__) && !defined(BUILD_FOR_PICO_CMAKE) && !defined(BUILD_FOR_STM32CUBE_CMAKE) && !defined(BUILD_FOR_NATIVE_PLATFORM) |
| 255 | +#if !defined(__MBED__) && !defined(BUILD_FOR_PICO_CMAKE) && !defined(BUILD_FOR_STM32CUBE_CMAKE) && !defined(BUILD_FOR_NATIVE_PLATFORM) && !defined(BUILD_FOR_ESP32_IDF) |
256 | 256 |
|
257 | 257 | /** |
258 | 258 | * Get the extents of the text provided in UTF8 as a flash based string using the F() macro |
|
0 commit comments