Currently, smooth fonts are antialiased differently depending on whether they are drawn directly on a TFT or drawn on a sprite and then pushed to the TFT. In my opinion, the anti aliasing should be consistent, regardless of where the text is being drawn.
Digging into the libraries, I noticed that drawGlyph() in Sprite.cpp overrides drawGlyph() in Smooth_font.cpp. For some reason, in Sprite.cpp, drawPixel() was only being called if the alpha value of the pixel was greater than 127. Removing the "if" statement and calling drawPixel() regardless of the alpha value of that pixel, resolves the inconsistency and produces great looking text!
Hi,
I found a bug.
_width and _height need to be initialized properly.
That is because they are used in drawString(). Lines 4118 and 4120 in TFT_eSPI.cpp.
Also added ability to push 1bpp bitmaps to a Sprite to support rendering
images on an EPaper screen.
Floyd-Steinberg dithering and basic graphics example added as first
ePaper demo.
This is stage one of support for ePaper displays from Waveshare.
Examples for 1 bit per pixel Sprites and 2 or 3 colour ePaper displays
to follow soon.