using custom fonts in Xamarin.Forms inside Xamarin.Mac

AbhijitDeshpandeAbhijitDeshpande ✭✭INMember ✭✭

I have gone through the documentation of using custom fonts (https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/text/fonts)
The document says about iOS, Android and Windows.

How to achieve in macOS. To give better clarity, here is my structure.

I have a Xamarin.Mac cocoa project thats using Xamarin.Forms (3.0)

My controls that need custom font are in XAML.

I have followed process given in documentation for iOS but it does not work.

Best Answer

Answers

  • AbhijitDeshpandeAbhijitDeshpande ✭✭ INMember ✭✭

    Thanks @LandLu.

    I managed to get the fonts working on macOS app.
    The main change was in the INFO.PLIST where the settings "Application fonts resource path".

    In iOS, this is an ARRAY of strings where each font needs to be declared
    while in macOS this is STRING which takes a single path to fonts folder.

Sign In or Register to comment.