I'm Trying to set font to my system and use it in my application it works fine for android but it does not apply for IOS
- First I Added .ttf File to Resources in IOS Project
Then Added This Font to Entitlements.plist
For Android, I Added to Assets Folder
Then App File in the Main Application I added this Code in dictionary Resources
<Style x:Key="LableStyle" TargetType="Label" >
<Setter Property="Label.FontFamily">
<Setter.Value>
<OnPlatform x:TypeArguments="x:String">
<OnPlatform.Android>
DroidSansArabic.ttf#DroidSansArabic
</OnPlatform.Android>
<OnPlatform.iOS>
DroidSansArabic
</OnPlatform.iOS>
</OnPlatform>
</Setter.Value>
</Setter>
</Style>
And for The Label I Added the Style like this
<Label HorizontalOptions="StartAndExpand"
Margin="20,5,0,0"
x:Name="lblForgotPassword"
Text="Forgot Password"
Style="{StaticResource LableStyle}">
</Label>
But it works fine in Android but not working in IOS Why ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…