spyder-ide / qtawesome

Iconic fonts in PyQt and PySide applications

Home Page:https://qtawesome.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a default fallback icon to show in case a entry for a font is removed after a font update

dalthviz opened this issue · comments

After font updates the respective *-charmap.json can have missing entries previously available. In case of complete removal of an icon from the font, QtAwesome should not throw an exception with a Invalid icon name "x" in font "y" message but show a default icon

Well, I think you need to select a fallback icon in the font itself and add the corresponding entries to the font's charmap.json.

I was thinking in a default icon for any icon set but I guess we could add a predefined name for the default icon to be added in the corresponding *-charmap.json (something like qta-default or something like that). Although if the addition in the charmap is forgotten then we should have a default icon or the exception should be still be thrown?

Maybe we should have a fallback chain like icon from the set > defined default icon from set > default qtawesome icon ?