[SOLVED] Certain Font Awesome icons not showing in Xamarin iOS

Problem

None of the icons in the FA v4.7 release were showing up for me, while all the others were… so I had a basic working scenario but not entirely.

Background

  • I was doing a simple approach of showing the icons in a Label like so:

    <Label FontFamily="FontAwesome" Text="&#xf2b5;" />

  • I had my FontAwesome.ttf file under the iOS project’s Resources folder and via a font explorer tool I confirmed that the v4.7 icons were indeed present in that file

    • for the record, the new v4.7 icons look to begin at unicode hex xf2b5 (“handshake-o”)
    • I also had my own FontAwesome.ttf listed under my Info.plist > UIAppFonts along with another custom font I was using successfully
  • From previous approach, I also had the Iconize library loaded… with it’s “iconize-fontawesome.ttf” listed in Info.plist as well

broken Info.plist (excerpt)

  
<key>UIAppFonts</key>
  
<array>
    
<string>iconize-fontawesome.ttf</string>
    
<string>iconize-material.ttf</string>
    
<string>RichardsonBrandAccelerator.ttf</string>
    
<string>FontAwesome.ttf</string>
  
</array>
  

Solution

The clue that tipped me off was that i noticed Iconize was built with an older version of FontAwesome… so as a guess, I re-ordered my FontAwesome.ttf entry ABOVE the iconize-fontawesome.ttf like below… and wouldn’t you know it, that actually did the trick! : )

WORKING Info.plist (excerpt)

  
<key>UIAppFonts</key>
  
<array>
    
<string>RichardsonBrandAccelerator.ttf</string>
    
<string>FontAwesome.ttf</string>
    
<string>iconize-fontawesome.ttf</string>
    
<string>iconize-material.ttf</string>
  
</array>
  
comments powered by Disqus