Repository navigation
Highlights
Chip-specific code now lives in src/arch, one folder per family, so new ports and speedups land without touching the core drivers.
Drawing is much faster on most boards, and fills, bitmaps, lines and text all got quicker.
Thanks to everyone below for their PRs.
Breaking changes
Sketches that #include <Adafruit_GFX.h> and <Fonts/X.h> build unchanged.
These cases need a change:
| Change | What breaks | Fix |
|---|---|---|
Sources moved to src/ (#538) |
Includes with a path into the library, like "../Adafruit_GFX_Library/Fonts/X.h" |
Use <Fonts/X.h> |
Your own makefiles or build scripts that list Adafruit_GFX.cpp |
Add src/ to the path. The library's CMakeLists.txt and component.mk are already updated. |
|
Scripts that write fonts into the library's Fonts/ folder |
Use src/Fonts/ |
|
| Arduino IDE older than 1.5 | Upgrade, it can't build from src/ |
|
| Canvases can't be copied (#534) | GFXcanvas16 c = GFXcanvas16(w, h);, passing a canvas by value, or assigning one canvas to another no longer compiles. The copy and the original freed the same buffer. |
Construct in place, GFXcanvas16 c(w, h);, or pass a pointer or reference |
setFont() cursor shift scales with text size (#549) |
At text size 2 and up, custom font text printed after setFont() moves down 6 px per size step to the correct baseline. Sketches that offset it by hand will be off. |
Remove the manual offset |
display() and clearDisplay() are virtual in Adafruit_GFX (#411) |
A subclass that declares either with a different return type, like bool display(), no longer compiles |
Return void |
Faster drawing
- Solid fills with
writePatternon ESP8266, about 18x, by @jrullan in #536 - DMA pixel output on ESP32-S2 and ESP32-S3 by @mikeysklar in #553
- Blocking SPI1 DMA output for CH32V407/467 by @ladyada-eagleclaw in #554
- Faster solid fills on RP2040, about 1.8x, by @mikeysklar in #529
drawBitmap()with a background color about 9x faster on TFTs by @mikeysklar in #552- Faster built-in font text by @nathanjshaffer in #446
- SPITFT lines drawn as Bresenham runs by @pepijndevos in #526
- Off-screen custom font glyphs skipped by @mikeysklar in #532
- Fast pin I/O for software SPI on STM32 by @omicronns in #451
New features
- UTF-8 text with custom fonts, turned on with
utf8(), by @DoomHammer in #414 applyRotation()andundoRotation()by @mikeysklar in #551setCursorX()andsetCursorY()by @mikeysklar in #545- Getters for text size, color and font by @mikeysklar in #530
Adafruit_GFX_Button::getLabel()by @egonza1661 in #344 andsetLabel()by @mikeysklar in #546fillQuarterCircle()by @BillMerryman in #517drawXBitmap()with a background color by @zunkworks in #338clearDisplay()anddisplay()stubs in the base class by @Beirdo in #411- NULL outputs allowed in
getTextBounds()by @mikeysklar in #547 getTextBounds()optionalxFandyFoutputs for justifying text by @tedtoal in #430- DigitalWF font by @wiredolphin in #100
- TomThumb extended Latin-1 characters by @mikeysklar in #550
- Sony Spresense support by @baggio63446333 in #431
- LGT8fx SPI display support by @h4tr3d in #428
Fixes
- RP2040
writePixelsand AVRspiReadfixes by @Daft-Freak in #362 - Canvas memory freed when deleted through an
Adafruit_GFXpointer by @mikeysklar in #524 - Circle helpers draw when called directly by @mikeysklar in #525
drawRGBBitmap()no longer crashes on a NULL buffer by @mikeysklar in #533conston string arguments by @kinafu in #302
fontconvert
- Browser version of fontconvert by @mikeysklar in #544
- Font hinting option by @virxkane in #367
- Stops on fonts over 64 KB by @mikeysklar in #531
- Stops when a glyph value doesn't fit the format by @mikeysklar in #548
- Windows guide updated for MSYS2 by @mikeysklar in #527
Examples, docs and CI
- Drawing speed benchmark example by @mikeysklar in #528
- Fonts example by @mikeysklar in #543
- Doc status badge by @idarlund in #405
- Typo and grammar fixes by @Semnodime in #413
- fillCircleHelper doc fix by @mikeysklar in #542
- CI uses
$HOMEby @DoomHammer in #537 - SPITFT arch moves by @mikeysklar in #539 and #540
Full Changelog: 1.13.0...2.0.0