Comments (6)
I have issued a pull request that speeds up rendering. This should work with any Adafruit_GFX API compatible library (drawFastHLine fn).
from openfontrender.
getTextWidth
and getTextHeight
methods have been added.
However, if you need both width and height, it is recommended that you use the calculateBoundingBox
or calculateBoundingBoxFmt
method and get the bounding box instead.
You can calculate width and height from bounding box and it is less computationally intensive that way.
from openfontrender.
ESP32 renders example "load from binary" now reports 54ms (8 bit parallel interface). If the cache is valid for a repeat render then this reduces to 27ms, which is circa 1ms per character.
from openfontrender.
That's awesome. I'm using this primarily in some IT8951 (parallel epaper displays) but I'm sending data from ESP32S3 as fast I can per SPI. Will try and see if I can get more speed with your fix.
But I'm using @lovyan03 Lovyan GFX as a controller library and they don't use Adafruit but their own GFX.
from openfontrender.
Awesome work will try it before closing the ticket to give you feedback.
Thanks a lot!
from openfontrender.
Thanks TakkaO working as expected. Still didn't try the calculateBoundingBox but I will soon!
from openfontrender.
Related Issues (20)
- tft_eSPI printf not using bg colour HOT 6
- FreeType Cache just keeps growing HOT 3
- [OFR ERROR] FTC_Manager_LookupFace error: 0x40 HOT 2
- Feature request: output to image file HOT 3
- Feature request: text wrap HOT 1
- SdFat support? HOT 2
- Please support ARM cortex arch? HOT 2
- Feature Request: Text outline support
- Feature request: loading fonts from SPIFFS/LittleFS HOT 4
- Compilation error using "setBackgroundFillMethod" HOT 1
- How can an integer be printed without sprintf HOT 2
- Nucleo64 : undefined reference to `_open' HOT 6
- STM32H750 HOT 2
- Using SPIFFS instead of SD HOT 2
- Getting flickering with large front redraws HOT 6
- Align::*Right doesn't work quite right? HOT 3
- Text alignment seems shifted down about 50% of glyph height HOT 12
- ESP32 crash with certain configuration HOT 1
- Vertical centering with a line break HOT 4
- Recommendations for memory use? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfontrender.