We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Can't use custom font with AutoComplete view

FontFamily="Hero.otf#Hero" DropDownItemFontFamily="Hero.otf#Hero" IndicatorFontFamily="Hero.otf#Hero"

These two properties when set inside an autocomplete control give me this error: Java.Lang.RuntimeException: Font asset not found Hero.otf#Hero

Yet the font is present on the Assets folder, and works just fine in other controls. It's just this Syncfusion one that throws the error. From what I've tested, it needs all three FontFamilies set for the font to show (it works fine on iOS as well (using the appropriate name for the font, code above was just an example)).

Also, how do I add formatted code to the forums? It seems to delete xaml tags. 

2 Replies

GA Gabriel January 14, 2019 01:57 PM UTC

So a workaround seems to be using just "Hero.otf" instead of "Hero.otf#Hero". Which is weird, as the latter is the Xamarin Forms standard for Android.



DR Dhanasekar R Syncfusion Team January 16, 2019 12:33 PM UTC

Hi Gabriel, 
  
Greetings from Syncfusion. 
  
In our current implementation of SfAutoComplete, we can provide only FontFamily name as "Fontname.ttf". Hence to provide “The Custom Font declaration as like in Xamarin controls” we have added it to our feature request list. We will implement this feature and include this in our upcoming 2019 Volume 1 release which will be released by mid of March 2019. You can track the feature details from below link. 
 
 
Regards, 
Dhanasekar 


Loader.
Live Chat Icon For mobile
Up arrow icon