Android-Iconics icon indicating copy to clipboard operation
Android-Iconics copied to clipboard

Update Google Material icons

Open Nek-12 opened this issue 2 years ago • 8 comments

About this issue

I'm using Google Rounded material and I'm frequently encountering missing icons compared to here (the link is an example of a missing icon)

Details

  • [x] Used library version Google rounded material 4.0.0.1-kotlin@aar

Checklist

P.S. I think all icon packs need an update, not just this one. Last update was long ago.

Nek-12 avatar Apr 11 '22 15:04 Nek-12

The latest version here is still v4.0.0: https://github.com/google/material-design-icons/releases

mikepenz avatar Jun 24 '22 08:06 mikepenz

I believe it's just the "scrapper" version. The actual icons are reflected on the API. Otherwise I don't really know how to explain the discrepancy in icon availability

Nek-12 avatar Jun 26 '22 15:06 Nek-12

Yeah, it seems like Google is migrating towards "Material Symbols" with a lot of new and changed icons and new styling principles (Fill/Weight/Grade/Optical size). For now, I've created a custom Iconics font/mapping for filled and outlined variants from the library contents (via parsing names and building font), but, probably, that would be super cool to provide one from Iconics.

refs:

https://fonts.google.com/icons https://github.com/google/material-design-icons

smelfungus avatar Jul 06 '22 11:07 smelfungus

Thank you @dummyco for chiming in on it.

There doesn't seem to be a provided packaged ttf anymore with the css mapping, unless I am overlooking this one?

mikepenz avatar Jul 06 '22 11:07 mikepenz

@mikepenz yep, that was a headache 😄 I've ended up cloning the material icons repo, writing the script to walk through material-design-icons/symbols/web/ directory, filtering materialsymbolsoutlined + _wght500grad200_48px, _wght500grad200fill1_48px variants and feeding them into this fantasticon tool (to generate ttf+css mapping) and in your online project generation tool next.

One more thing, it seems like there are too many icons to contain them in a single set of fields (enum), so there was also a need to break into filled and non-filled enums.

smelfungus avatar Jul 06 '22 11:07 smelfungus

@dummyco yeah that's the most annoying piece for those super large icon sets. Having the same issue for CommunityMaterial: https://github.com/mikepenz/Android-Iconics/blob/develop/community-material-typeface-library/src/main/java/com/mikepenz/iconics/typeface/library/community/material/CommunityMaterial.kt#L81 splitting it into 3 enums.

I was investigating at some point to use other constructs but they were even worse in size and classes. E.g. sealed class, ...

The only "solution" would be to loose type safety and drop the enum, and only have a list of items, and you'd need to use a string to reference icons (which in my opinion would probably be worse)

Also with the different variants having to maintain: https://github.com/mikepenz/Android-Iconics/tree/develop/google-material-typeface is quite some effort.

On a relevant note. It is most likely better (given the material symbols) and the great vectorDrawable support these days (depending on your usecase) to get the specific items at the times they are needed. (and when not a huge amount of icons is needed)

mikepenz avatar Jul 06 '22 11:07 mikepenz

writing the script to walk through material-design-icons/symbols/web/ directory, filtering materialsymbolsoutlined + _wght500grad200_48px, _wght500grad200fill1_48px variants and feeding them into this fantasticon tool (to generate ttf+css mapping) and in your online project generation tool next.

Could you please share the script you used?

Nek-12 avatar Aug 25 '22 10:08 Nek-12

Sure, I'll try to compose some user-friendly steps/snippet asap

smelfungus avatar Aug 27 '22 11:08 smelfungus

Hello, I've actually made my own script and published it to https://github.com/Nek-12/MaterialSymbolsToFont Google devs answered that there is no CDN or automation to automate the update process, the only solution is to further automate the script and run it periodically, then export the Material Symbols as a custom IICon implementation, that's what I ended up doing

Nek-12 avatar Jan 25 '23 13:01 Nek-12

Hi. I encountered the same problem.

I'm not familiar with Compose technology, but there are convenient access to Material Design Icons via Compose classes: https://developer.android.com/reference/kotlin/androidx/compose/material/icons/Icons

It mentioned in official Google Fonts site. Looks like there are usual and extended icon sets, that already managed and updating by Google. image

Maybe there is any way to reuse this Compose icons in Android-Iconics library? It could be something like compatibility layer for Compose icons.

Or are there any plans to update google-material-typeface to latest icons set?

We discovered your library recently and it looks very cozy. But due to lack of some icons it became question about using the library.

ViRGiL175 avatar Mar 07 '23 16:03 ViRGiL175

Those icons are basically shape/path classes with some fill. This library is about a different thing - using fonts as icon packs. If you want to use those icons, just use the relevant icon composable. As for missing icons, a somewhat hacky solution is outlined above. No other solution seems possible for now

Nek-12 avatar Mar 08 '23 09:03 Nek-12