Need help getting large font on 2.66" Waveshare E-Paper Display

Hi folks,

I'm onto version 3 of my motorbike grip heater controller + clock. V1 had an LCD display, but the display would go black when left in the sun. V2 uses a LED display with large digits, but even at maximum brightness they can't easily be seen when full sunlight is on the display. For V3 I thought I'd give E-Paper a try.

I purchased a Waveshare 2.66" display along with an ESP32 display driver. I've managed to integrate that into the Arduino IDE and got a test program working, but the largest font available under their library is 24 - and I really need something at least 4 times bigger than that.

Can anyone suggest anything that already exists before I go down the labourious path of creating an appropriate font / images myself? It only needs to have digits 0 -> 9 plus colon.

Many thanks.

Have you tried using the 24 point font, but drawing it on the display using 2x2 or 3x3 pixel boxes instead of single pixels?

That is how the Adafruit gets away with a single font table in the "minimal memory" version of the GFX library.

One option would be to try out the GxEPD2 library.

It's based on AdafruitGFX and has handy stuff like setTextSize(4) to get a 4x magnification. It also comes with a few different font choices, and I think there are more around the web.

I suspect that you might need to use the GxEPD2_266_BN class.

I hadn't heard of that functionality; how does one enable it?

I did install that library and looked at one of the examples but, unfortunately, I don't yet know enough about how to configure it correctly to make it work with my hardware, and ended up with compile errors.

I might "sink my teeth" into it a bit more this weekend and try to figure it out. I'm an absolute novice when it comes to E-Paper displays; and I'm lead to believe that are a bit more "finicky" than the other technologies (ones that I also struggle a bit with but generally "get there in the end").

It is a standard way of changing font size. You can look at the AdafruitGFX library code to see how they do it, and at the Waveshare library code to see if such an option exists, or would be simple to implement.

Thanks for the reply but, unfortunately, that's way beyond my current skillset.

I've been doing a bit of "Googling" on the topic, but most of what I read is about as comprehensible as a foreign language to me.

Well, it boils down to something like either
drawPixel(x,y,color);
or
drawRect(x,y,sizex, sizey,color);

Here is the ACTUAL CODE in Adafruit_GFX.cpp, function drawChar():

          if (size_x == 1 && size_y == 1)
            writePixel(x + i, y + j, color);
          else
            writeFillRect(x + i * size_x, y + j * size_y, size_x, size_y,
                          color);

Your call.

Sorry, but I'm completely lost.

I need to send 4 digits, each between 0 & 9 to the appropriate part of the display - not write pixels, rectangles, or charts.

At best I'm a library user, capable of "monkee see, monkey do" baby steps; this seems more like the realm of an intermediate library coder.

These e-paper displays can be read in full sunlight, but you need good UV protection and heat protection, else they turn black in sunlight, especially during screen update.

I would recommend to use transflective TFT displays for your purpose.

You need to just uncomment one line in GxEPD2_display_selection_new_style.h, line 44, to get started with using GxEPD2 with your display:

//#define GxEPD2_DRIVER_CLASS GxEPD2_266_BN // DEPG0266BN   152x296, SSD1680, (FPC7510), TTGO T5 V2.66, TTGO T5 V2.4.1

I use Squix Font Converter for big fonts creation.
-jz-

Thanks for that one, it looks like a very handy resource!

You can also try this one. It can convert any .ttf font you want and works fine with GxEPD2.

Thanks for your sage advice; I'll take a closer look at transflective TFT displays. Are they still temperature sensitive?

I'll have a closer look at your excellent library in the weekend; what's the biggest font size that it has?

Many thanks.

You find them here: https://github.com/ZinggJM/GxEPD2/tree/master/extras/tests/GxEPD2_RefreshTests

But you can create whatever size you like.

I have no (outside) experience with them yet, except the ones on Garmin GPS devices.

I played with the one referenced here: https://github.com/ZinggJM/SSD1283A, inside only.

Sounds promising - thanks again for your help.

To increase the font size on a Waveshare E-Paper Display with a 2.66-inch screen, you will typically need to modify the code or configuration settings of the device or software you are using to control the display. Here are some general steps to help you achieve a larger font size:

Check the Display Resolution: Determine the resolution of your 2.66-inch Waveshare E-Paper Display. Knowing the resolution (e.g., 296x128 pixels) will help you understand the available space for text.

Select a Font Library: Many E-Paper Displays allow you to use custom fonts or fonts from a library. You can search for a font library that offers larger font sizes and select an appropriate font file.

Modify the Code: If you are using code to display text on the E-Paper Display, locate the part of the code where the font size is set. It is often controlled by parameters like font size, height, and width. Increase these values to make the text larger. Be careful not to exceed the display's resolution or dimensions.

Here's an example using Python and the Waveshare library for a Raspberry Pi:

python

from waveshare_epd import epd2in66

epd = epd2in66.EPD()
epd.init()
font_size = 24  # Increase this value for a larger font
epd.set_font_size(font_size)

Adjust Text Position: After increasing the font size, you might need to adjust the position of the text to ensure it fits within the display without overlapping or going beyond the edges.

Test and Iterate: Run your code with the modified settings and check if the font size on the display meets your requirements. If not, continue tweaking the font size and text positioning until you achieve the desired result.

Consider Display Limitations: Keep in mind that larger fonts may reduce the amount of text you can display on the screen simultaneously. Make sure the chosen font size fits the intended purpose of the display.

Documentation and Libraries: Refer to the documentation provided with your E-Paper Display and any libraries you are using for specific instructions on font size customization. Different displays and libraries may have variations in how they handle font rendering.

Hardware Limitations: Lastly, be aware that the display's physical size and resolution can limit how large you can make the font while still maintaining readability.

By following these steps and customizing your code or settings, you should be able to increase the font size on your 2.66-inch Waveshare E-Paper Display to better suit your needs.

@forgreforn, are you citing ChatGPT? If so, you should indicate this fact.

Have you used a colour filter on it like this for red?

What driver is used in the e-paper? Maybe the Bodmer TFT_eSPI and takkaO OpenFontRender is usable. It create smoothed fonts on every size you want.
screenshot_34709

This is made with one font and 4" TFT for a clock. Don't work on an ESP8266 due to low heap space.