locked
Custom Font not showing in Xamarin Storyboard RRS feed

  • Question

  • User150032 posted

    For my iOS project i need to use custom fonts. I added fonts in Resources/Fonts folder. And register the fonts in Info.plist,

    In storyboard i am getting custom fonts

    but the fonts not affecting in design. The font style drop down always empty like below

    What have i done wrong?

    I am using Xamarin Studio - 5.10.3 and Fonts - Exo-SemiBold.ttf, Montserrat-Bold.ttf

    Friday, March 18, 2016 9:34 AM

All replies

  • User217491 posted

    Im having the same issue. Any update?

    Monday, May 9, 2016 12:43 AM
  • User11701 posted

    Still an issue with XS 6.3 - although I do get the Custom Fonts listed in most of my XIB files, the LaunchScreen.storyboard doesn't see them.

    With the rogue XIBs I can assign the Font in code but even if I edit the XML of the storyboard it just reverts to the System font which is a pain.

    Edit: Further searching I found this post (https://forums.xamarin.com/discussion/34283/using-custom-font-in-launch-screen-storyboard) which could explain the Launch Screen issue - but not the few XIBs that don't see to play well with Custom Fonts.

    Friday, April 7, 2017 7:33 AM
  • User229084 posted

    This is the solution for this issue, add the font for code.

    var firstAttributes = new UIStringAttributes { ForegroundColor = UIColor.White, Font = UIFont.FromName("OpenSans-Semibold", 28f) };

            lb_title.AttributedText = new Foundation.NSAttributedString("Relationship Capital Management", firstAttributes);
    

    Regards

    Friday, May 12, 2017 12:40 PM
  • User229084 posted

    For know you can solve the problem adding the font for code. Regards!!!


    var firstAttributes = new UIStringAttributes { ForegroundColor = UIColor.White, Font = UIFont.FromName("OpenSans-Semibold", 28f) };

            lb_title.AttributedText = new Foundation.NSAttributedString("Relationship Capital Management", firstAttributes);
    
    Friday, May 12, 2017 12:41 PM