0
votes

My App will be used on iOS, I have Windows and Android versions, but I am not too concerned with getting the custom font to work for those platforms. Mainly IOS.

I know how to add the .ttf file to my Resources folder, and set it to Copy Always, I also update the IOS file info.plist and add a string array with name 'Fonts provided by application' and value 'Cardinal.ttf'

What I am not clear on is how to call the Font Family in my Cross Platform code. I know I do something like

labelName.Font = UI.Font( "Cardinal" )

However this will not work in Cross Platform because the UI namespace is not available.

Any help here?

Something with Device.OnPlatform( ...

1
FontFamily="Cardinal", while the font has been loaded by the system it will work (on iOS, Android is another history....).Gusman
i see, i see entermorecharshereMattyMerrix

1 Answers

0
votes

Thanks to @Gusman above! You simply specify the FontFamily as a string with the value of the Font name. As long as you added the ttf file to resources and updated the info.plist file correctly, it will load the Font on App startup and the call to

FontFamily="Cardinal"

will work fine. Cheers!!!