Giter Site home page Giter Site logo

Built-in fonts about esphome HOT 2 CLOSED

nagyrobi avatar nagyrobi commented on June 20, 2024
Built-in fonts

from esphome.

Comments (2)

nagyrobi avatar nagyrobi commented on June 20, 2024

OK, after reading a bit, compressed and subpx can be ditched.

TLDR;
https://docs.lvgl.io/8/overview/font.html#subpixel-rendering this looks as something pretty hardware-specific:

Subpixel rendering works only if the color channels of the pixels have a horizontal layout. That is the R, G, B channels are next each other and not above each other.

You can't rotate the screen because of this. I guess this is targeted in LVGL to speciality hardware which is developed with a certain screen in mind.

We could ditch montserrat_12_subpx, also because this subpixel font is only available in12px size. It also requires special parameters at compile time. Imho if anyone wants to play with subpixel rendering in ESPHome, should try on a dedicated branch with custom fonts rendered.

https://docs.lvgl.io/8/overview/font.html#compress-fonts compressed fonts have a compromise:

The compression is more effective with larger fonts and higher bpp. However, it's about 30% slower to render the compressed fonts. Therefore it's recommended to compress only the largest fonts of user interface, because

  • they need the most memory
  • they can be compressed better
  • and probably they are used less frequently then the medium sized fonts, so the performance cost is smaller.

Don't think this is appropriate for ESP's, or the platforms ESPHome targets. I thinbk montserrat_28_compressed is the only one included (just like montserrat_12_subpx) just to demonstrate that these featrues are doable in LVGL, but imho ESPHome doesn't need these.

from esphome.

clydebarrow avatar clydebarrow commented on June 20, 2024

Done

from esphome.

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.