Reputation: 869
I am trying to start building an app for ios using Xamarin and I have a localization problem.
I have installed some custom fonts in my mac which the Notes application recognizes and has no problem with.
But the font don't appear in Properties panel of the controls in Xamarin.
Thanks before.
Upvotes: 0
Views: 1399
Reputation: 21
Alan solves the question.
A solution to do it in code:
Xamarin iOS:
(ILabel).Font = UIFont.FromName ("font name", 30f);
Your font needs to be built like a "Content" in any directory
Xamarin Android:
(TextView).SetTypeface(Typeface.CreateFromAsset(Application.Context.Assets, DISPLAY_FONT), TypefaceStyle.Normal);
(TextView).TextSize = 32;
Needs to be copied to your /Assets/(FONT).TTF
and needs to be built like AndroidAsset
;-)
Upvotes: 2
Reputation: 81
Custom fonts should show up in the property panel in Xamarin Studio 5.7 and higher.
Upvotes: 1