Add Material Design Symbols #54
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the Material Symbols icon suite. Closes #3.
There are two issues I'd like to bring to your attention before you merge this PR:
Firstly, some of the Material Symbols have names starting with digits, such as
10mp-symbolic.svg. These can't be used as constants, so I updated the codegen file to produce names likeICON_10MPif the icon's name starts with a digit. This is a bit of a hack, so if you'd like me to approach this issue in some other way, I'd be happy to do so.The second issue is much more complicated.
I ran into a really confusing bug while adding these icons, and I've worked around it in a somewhat hacky way. Current versions of the Material Symbols icon set seemingly use an SVG feature that the GTK renderer can't cope with. To work around this, I've checked out the
material-symbolssubmodule at a commit version that predates this change.For example, the file
10mp.svgcurrently looks like this:This version of the icon doesn't render for me on Fedora Workstation 43 (KDE) with GTK 4.20.3. Instead, there's a blank square where the icon should be.
The version I've checked the submodule out to looks like this:
This icon renders fine.
I really don't know what causes this -- it could be the
viewBox, the change inpathformat, or something else entirely.Even more strangely, the issue only shows up when I include the icon through
relm4-icons. If I bundle the icon myself, using agresource.xmlfile like this......it works! The exact same
10mp-symbolic.svgfile works if included directly in this manner, but doesn't render if included byrelm4-icons. 😵💫