awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications
Apache License 2.0
384 stars 89 forks source link

Sometimes, Icons in IconButton dont show up #71

Closed bsanie closed 3 years ago

bsanie commented 3 years ago

for some reason, when running the application. Icons dont appear! Below two screenshots show when icons are shown and they are not.

image

image

mkoertgen commented 3 years ago

Hi @bsanie ,

Thanks for reaching out. Let's triangulate the problem:

I remember a similar issue that was to do with using another complementary font-glyph-library for MaterialDesign.

bsanie commented 3 years ago

Hello @mkoertgen Thanks for your comment. My bad, I didnt scan closed issues for the same issue i had. I found the solution in this thread https://github.com/awesome-inc/FontAwesome.Sharp/issues/65

all i did is solve this issue is to set IconFont explicitly.

bsanie commented 3 years ago

Hi @mkoertgen Looks like my problems are execatly like the guy in this thread https://github.com/awesome-inc/FontAwesome.Sharp/issues/65

After setting IconFont to Solid, i started (Sometimes, not always,) getting an exception that says "Value cannot be null.\r\nParameter name: family"

is there a solution or workaround for this?

mkoertgen commented 3 years ago

Hi @bsanie ,

Font awesome is a bit peculiar about icon-sets are mapped to separate font styles / family.

If you show icons in a static manner, be sure to check the icon sheet

For dynamic scenarios the auto-style will try to find (and cache) your icon in the respective fonts / styles.

bsanie commented 3 years ago

Thanks @mkoertgen, All my issues with FrontAwesome.Sharp are resolved.