-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Describe the bug
Hi @wilsonvargas, thank you for helping us with this great plugin.
To make use of font icons from the latest version (53.1) of FontAwesomeWeb (ttf) filesI updated the my App's info.plist file as below.
fa-solid-900.ttf
fa-regular-400.ttf
fa-brands-400.ttf
MaterialIcons-Regular.ttf
But while testing my changes with ButtonCirclePlugin using FontAwesomeWeb v5.3.1 I am getting unhandled exception error as shown below.
Can you please confirm if your codebase is tied only to your version of the Font Awesome and Material ttf files?
<cFAB:CircleButton
IsVisible="True"
Grid.Row="0"
Grid.Column="1"
x:Name="fabRound"
FontIcon="FontAwesome" <=== this is a as is enum from your code. How does it read
the key value from about updates in the info.plist?
It doesn't throw any error when using around
MaterialIcon even when my value in the info.plist is
as shown above
Icon="fa-bed"
FontSize="15"
TextColor="WhiteSmoke"
HeightRequest="35"
WidthRequest="35"
BorderThickness="5"
BorderColor="Red"
BackgroundColor="White"
Clicked="Clicked"/>
To Reproduce
Steps to reproduce the behavior:
-
Go to '...' Download latest FontAwesomeWeb v5.3.1 font file
-
Click on '....' unzip the downloaded file. Copy all 3 ttf files from {downloadfolder\fontawesome-free-5.3.1-web\fontawesome-free-5.3.1-web\webfonts} in your iOS app's resources folder.
Use https://github.com/smourier/FontAwesomeEnum to create a fontAwesomeWeb Enum class.
I have a attached .cs file that has new enums and literals defined for version 5.3.1. Remove the .txt extension to get to .cs file.
FontAwesomeWeb531Font.cs.txt -
Scroll down to '....' Update your info.plist as shown above
3.1 in App.xaml include following resource declarations<Application.Resources>
<ResourceDictionary> <OnPlatform x:Key="FontAwesomeWeb531SIconsFontFamily" x:TypeArguments="x:String" Android="fa-solid-900.ttf#FontAwesome5FreeSolid" iOS="FontAwesome5FreeSolid" /> <OnPlatform x:Key="FontAwesomeWeb531RIconsFontFamily" x:TypeArguments="x:String" Android="fa-regular-400.ttf#FontAwesome5FreeRegular" iOS="FontAwesome5FreeRegular" /> <OnPlatform x:Key="FontAwesomeWeb531BFontFamily" x:TypeArguments="x:String" Android="fa-brands-400.ttf#FontAwesome5BrandsRegular" iOS="FontAwesome5BrandsRegular" /> <OnPlatform x:Key="MaterialIOIconFontFamily" x:TypeArguments="x:String" Android="MaterialIcons-Regular.ttf#MaterialIcons-Regular" iOS="MaterialIcons-Regular" /> </ResourceDictionary> </Application.Resources> -
See error - see the screenshot below
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:
- Which version of the ButtonCircle do you use? 2.0.3
- Which version of Xamarin.Forms do you use? 3.2 pre2
- Which OS are you talking about? iOS 11.14
Thanks