Forum Xamarin.Forms

FontImageSource destroys other Labels

walliwalli Member ✭✭

Hello,
we are using a FontImageSource to load icons for a TabbedPage (works fine).
On Android however, once the FontImageSource loaded the font, our other icons (Labels with font set to the icon font) do not work anymore.
The FontImageSource and our icons share the same font file from the android assets.
When using another font file for the FontImageSource, the problem disappears.

Regards,
Gabriel

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited June 2019

    You can try to use DynamicResource for FontImageSource

    <FontImageSource
            FontFamily="{DynamicResource MaterialFontFamily}"
            Glyph="{Binding Car}"
            Size="44"
            Color="{StaticResource PrimaryColor}" />
    
  • lowleetaklowleetak MYMember ✭✭

    @LeonLu said:
    You can try to use DynamicResource for FontImageSource

    <FontImageSource
            FontFamily="{DynamicResource MaterialFontFamily}"
            Glyph="{Binding Car}"
            Size="44"
            Color="{StaticResource PrimaryColor}" />
    

    Tested not working on my side

Sign In or Register to comment.