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

Ability to use Custom Icons (fapro) #2075

Open
HadiHassaoui opened this issue Apr 23, 2024 · 4 comments
Open

Ability to use Custom Icons (fapro) #2075

HadiHassaoui opened this issue Apr 23, 2024 · 4 comments
Labels
Enhancement For suggestions that add new features or improve existing functionalities.

Comments

@HadiHassaoui
Copy link

Enhancement Summary

Adding support ot use custom icons

Detailed Description

Is-it possible to add the possiblity to use custom icons (ex.: fapro:mycustomicon). mainly in main page where there no text on top chip/icon of the home page (would be nice everywhere too).

Additional Context

No response

@HadiHassaoui HadiHassaoui added the Enhancement For suggestions that add new features or improve existing functionalities. label Apr 23, 2024
@edwardtfn
Copy link
Collaborator

This is a bit more complex than it looks initially. The fonts must me loaded to the Nextion Display at build time, so we have to create a font with all the possible icons, in all the different sizes and load this to the TFT file when building it. And to make it worse, the fonts takes a lot of space which we don't have available... 😩

@HadiHassaoui
Copy link
Author

I understand the issue, thanks for the fast answer and the precise explanation. and by the way that's a wonderfull work that you did.

@NdS-Research-Facilities

I was trying to create a large (70~100 pt) mdi icon font, but didn't succeed.
Any hints on how to make these Nextion fonts from mdi would be greatly appreciated
(So not custom, just bigger)

@edwardtfn
Copy link
Collaborator

We use this tool, just changing the font size: https://github.com/edwardtfn/Generate-HASP-Fonts/blob/e1428f346777be69440f6bb00f1698815cb525d4/Generate-HASP-Fonts.ps1#L74

It creates a merging of two fonts, one for text, with ASCII chars only, and one for the icons, and merge both in a .zi file. You can play with that to generate only the icons, or even to use the custom icons you want, with the size you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For suggestions that add new features or improve existing functionalities.
Projects
None yet
Development

No branches or pull requests

3 participants