https://kotlinlang.org logo
#compose
Title
# compose
k

Kyant

08/18/2022, 6:02 AM
Is there a plan for supporting Material Symbols in compose?
g

Grégory Lureau

08/18/2022, 7:27 AM
(and it's also available for CfD)
s

Stylianos Gakis

08/18/2022, 7:32 AM
Material icons and Material Symbols are two different things afaik. If you click on the original link in this thread you’ll see a bunch of icons we don’t have access to with the material.icons dependency. The link says 2.500+ glyphs. We definitely don’t have 2500 icons in the androidx.compose.material.icons dependency. Plus those new symbols allow for more customisability with size, weights and stuff like that.
g

Grégory Lureau

08/18/2022, 7:40 AM
I didn't know the difference, thanks! (Also note that `androidx.compose.material:material-icons-extended`adds a lot of icons, but they are still not embedded in a font. Looks like it's closed/more to 2100 icons, in up to 4 different styles)
t

Tgo1014

08/18/2022, 8:57 AM
Would be nice to have the preview for the icons 😅
k

Kyant

08/18/2022, 8:59 AM
@Tgo1014 There is a plugin that can preview the compose icons ☺️
t

Tgo1014

08/18/2022, 8:59 AM
Do you have a link? Sounds really useful
I tried to use
Text
to display Material Symbols font, but the symbols aren't always rectangular. If I wrap
Text
with a
Box
, the icon will shift down a bit, just because it behaves like text.
@Stylianos Gakis You can download it in your browser, then drag it to Android Studio.
z

Zoltan Demant

08/18/2022, 10:25 AM
That plugin was awesome, thank you. I love this slack channel! 🦜
c

Casey Brooks

08/18/2022, 2:00 PM
Note that “icon fonts” really are just a hacky way to get SVGs into HTML websites, rather than actually being a good way to display icons. You’ll be much better off using proper `Image()`/`Icon()` composables with
material-icons-extended
as they provide accessibility info you won’t get in
Text()
, as well as image filters, tinting, and things like that
e

eygraber

08/18/2022, 2:17 PM
My design team heavily relies on using icon fonts to inline icons into text. They always point to SFSymbol and say that if Apple can do it, then Google can as well ¯\_(ツ)_/¯
s

Siyamed

08/18/2022, 2:47 PM
I will ask to google fonts team as well, but meanwhile what stops a developer to use the font provided (either by embedding into an app or using downloadable fonts)
Was the question more about having them in vector drawable format?
9 Views