Coder Social home page Coder Social logo

Comments (6)

Bodmer avatar Bodmer commented on June 12, 2024 1

I have issued a pull request that speeds up rendering. This should work with any Adafruit_GFX API compatible library (drawFastHLine fn).

from openfontrender.

takkaO avatar takkaO commented on June 12, 2024 1

@martinberlin

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.

Bodmer avatar Bodmer commented on June 12, 2024

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.

martinberlin avatar martinberlin commented on June 12, 2024

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.

martinberlin avatar martinberlin commented on June 12, 2024

Awesome work will try it before closing the ticket to give you feedback.
Thanks a lot!

from openfontrender.

martinberlin avatar martinberlin commented on June 12, 2024

Thanks TakkaO working as expected. Still didn't try the calculateBoundingBox but I will soon!

from openfontrender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.