Bug 35370 - Custom otf fonts not recognized in storyboard designer
Summary: Custom otf fonts not recognized in storyboard designer
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS Designer ()
Version: 5.9
Hardware: All All
: --- normal
Target Milestone: master
Assignee: Vinicius Jarina
URL:
Depends on:
Blocks:
 
Reported: 2015-10-29 14:52 UTC by Matthew Orlando
Modified: 2015-10-30 16:05 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Matthew Orlando 2015-10-29 14:52:14 UTC
I have added custom fonts to the project per the instructions here: https://blog.xamarin.com/custom-fonts-in-ios/

All of the fonts are in the root Resources directory, with "BundleResource" and "Copy always"

My Info.plist file has the following:

  <key>UIAppFonts</key>
  <array>
    <string>SST-Bold.otf</string>
    <string>SST-BoldItalic.otf</string>
    <string>SST-Heavy.otf</string>
    <string>SST-Italic.otf</string>
    <string>SST-Light.otf</string>
    <string>SST-Roman.otf</string>
  </array>

If I set elements to this font in code it works fine (e.g. MyButton.Font = UIFont.FromName("SST-Heavy", 22); )

However, if I open the storyboard in the Xamarin designer, the font doesn't show up in the font drop downs in the properties panel. Considering how images are supported in the storyboard, I don't understand why this doesn't work.

This is happening both in Visual Studio on Windows and Xamarin Studio on OSX
Comment 1 Matthew Orlando 2015-10-29 14:58:47 UTC
If I edit the storyboard XML to use the desired font, it works on device & simulator, but shows up as the regular system font in the designer (even in the properties panel).
Comment 2 Alex Corrado [MSFT] 2015-10-30 11:08:13 UTC
It sounds like we need to add otf to the list of recognized font formats.
Comment 3 Vinicius Jarina 2015-10-30 16:04:49 UTC
Fixed ;-)

Thank you Matthew.