1
votes

I'm developing an Universal version of my WP8 Silverlight application, so I created a new Universal Windows Project (Windows / Windows Phone 8.1).

The problem is that some of my fonts that are correctly shown in my Silverlight project aren't rendered in the new project.

All my fonts are in the Shared project in the folder Assets/Fonts with the Build Action set to Content.

The weird thing is that two fonts work and other two fonts don't.

Here's how I set the font in my Windows Phone project:

<Button Content="GIOCA" Style="{StaticResource MenuButton}" FontFamily="Assets/Fonts/nexa-thin.ttf#Nexa Thin" FontSize="36" HorizontalAlignment="Stretch" Margin="0,50,0,0" />

The font is correctly listed as part of the project, no errors, but the font that I see is just the default one.

The fonts that don't work were .otf but I converted them to .ttf using an online tool. Otf fonts were not working in the Silverlight project either but the converted ones worked properly. Is there anything else I could try?

1

1 Answers

2
votes

I got it working! I just had to remove the "Light" from the name! So, for example, FontFamily="./Assets/Fonts/NexaLight.ttf#Nexa Light" should be FontFamily="./Assets/Fonts/NexaLight.ttf#Nexa"