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

Most of Icons does not appear on .Net Core 3.1 Windows Forms App #47

Closed Ghassenbbb closed 3 years ago

Ghassenbbb commented 4 years ago

Hello, I've installed FontAwesome.Sharp from NuGet Package Manager on a fresh .Net Core 3.1 Windows Forms App Project, I can create Icon Buttons but only few Icons appear.

mkoertgen commented 4 years ago

Hi @Ghassenbbb,

In Designer they don't show up as of now. In runtime they should.

Ghassenbbb commented 4 years ago

Hi @Ghassenbbb,

In Designer they don't show up as of now. In runtime they should.

I've tested it on Runtime too and still does not appear.

mkoertgen commented 4 years ago

Ok, could be related to #46 . Probably the unicodes changed and we have to regenerate the enums.

mkoertgen commented 4 years ago

Can you list some icons that definitely don't show up, e.g. FaCogs? That would make it easier to review & check.

Ghassenbbb commented 4 years ago

I noticed that most of Icons that works are Brand Icons, and None of User Interface Icons works. Here is few Icons names that Does not Work :

These ones works fine :

mkoertgen commented 4 years ago

Ah, ok that makes sense. The brands-section did change over the last few releases. However i would not have expected that some basic icons like Copy, PaperClip change their unicode-values in the release-process of fortawesome.

I will regenerate and publish a 5.14.1 today then. Thanks!

Ghassenbbb commented 4 years ago

Thanks @mkoertgen This is truly above and beyond. Keep it up

mkoertgen commented 4 years ago

Hi @Ghassenbbb , i just checked. The unicode-values did not change. Sadly, it seems to be a winforms-issue because WPF works fine.

mkoertgen commented 4 years ago

Just sample-checked winforms elements dropdown, menuitem, ... with Trailer, Bacteria & Bacterium, ....

Works without problems.

image

What elements did you notice with problems?

Ghassenbbb commented 4 years ago

I have only IconButton and IconPictureBox, I'm having the same issues on both of them.

wz

mkoertgen commented 4 years ago

Thanks for getting back. I will double check IconButton/PictureBox.

FoxCouncil commented 4 years ago

The reason the brand icons are working is because the FallbackFont ends up being the fa-brands-400.ttf font.

The Typeface.TryGetGlyphTypeface(GlyphTypeface) method always returns false and the GlyphTypeface is always null here. This is the primary reason the font doesn't switch to the correct one and only works with brand IconChar's.

I'm now trying to determine why Typeface.TryGetGlyphTypeface(GlyphTypeface) is not returning the same results as .NET Framework vs .NET Core

mkoertgen commented 4 years ago

@FoxCouncil great work. Thanks man!

aeonSolutions commented 3 years ago

just built from source last commit however is still not working . here's what i got:

devenv_myCnxcbQKB

FoxCouncil commented 3 years ago

With the latest git commit, locally packed up into a nuget, and .NET 3.1 WinForms. I'll give .NET 5 a test soon...

Working both in Design Time and Runtime for me.

Microsoft Visual Studio Enterprise 2019 Version 16.7.2

image image image

Ghassenbbb commented 3 years ago

@FoxCouncil Please when the fix will be available on NuGet.org ?

mkoertgen commented 3 years ago

@FoxCouncil @Ghassenbbb If you agree that the last commit is working for you we can push a release in the next hour

Ghassenbbb commented 3 years ago

@mkoertgen Excuse me, I don't know how to install the new fix from Github (I tried) , that's why im asking for a NuGet Package Update.

mkoertgen commented 3 years ago

Ok, no problem. I will push an update.

Ghassenbbb commented 3 years ago

@mkoertgen @FoxCouncil Thank you, great work, it works fine now.