Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LVGL] Include font fallback #620

Closed
JomaImport opened this issue Nov 3, 2024 · 8 comments
Closed

[LVGL] Include font fallback #620

JomaImport opened this issue Nov 3, 2024 · 8 comments
Assignees
Milestone

Comments

@JomaImport
Copy link

In many cases it is very helpful to have a fallback for every font, I guess it will be a good idea and very easy to implement, just give the user the possibility to select the fallback font.

@mvladic
Copy link
Contributor

mvladic commented Nov 3, 2024

Are we talking about Dashboard project or LVGL project?

@JomaImport
Copy link
Author

LVGL 8.X

.dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL,
.user_data = NULL

In the generated code in the font C file the .fallback is always NULL, it would be helpful if the user could select the fallback font at design time

@mvladic
Copy link
Contributor

mvladic commented Nov 3, 2024

I didn't know about that. Do you know under what circumstances this fallback font will be used?

@JomaImport
Copy link
Author

JomaImport commented Nov 3, 2024

A fallback is used when one character is not found in the current font, in that case is used the character in the fallback font, so can be used in many cases when the needed character is not found in the generated font.

As an example you can see the two next pictures, the first one is a messagebox using the default Montserrat font, the second picture uses a generated font and as you will see the X symbol for closing it is not in the generated font so is not displayed. If the Montserrat font is defined as fallback font then this symbol is displayed correctly.

For your information we are using ESP-IDF for ESP32-S3.

EEZ_Studio_yr99OvarA8
EEZ_Studio_Dz6iS8fAmJ

@JomaImport
Copy link
Author

The same issue happens with other widgets like dropdown

EEZ_Studio_0Jz85nOrU2
EEZ_Studio_NzaeFyD8No

@mvladic
Copy link
Contributor

mvladic commented Nov 3, 2024

All clear, thanks!

@mvladic mvladic added this to the 0.20.0 milestone Nov 3, 2024
@mvladic mvladic changed the title Include font fallback [LVGL] Include font fallback Nov 9, 2024
@mvladic
Copy link
Contributor

mvladic commented Nov 9, 2024

Implemented.

image

@JomaImport
Copy link
Author

Thanks for implementing so quickly!

@mvladic mvladic closed this as completed Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants