Universal windows 10 apps support OTF fonts but to use them you might have to change the generated XAML a bit.

Using OTF fonts in a Windows 10 (WinRT) app.

This tutorial uses the beautiful Edmondsans font, created by James T.Edmondson, to demonstrate how to use OTF fonts in WinRT.

edmondsans

project

Open the font to inspect the Font name (Edmondsans Regular):

font info

XAML like this is created:

FontFamily="Edmondsans-Regular.otf#Edmondsans Regular"

Which strangely results in text rendered with the system font:

segoe

How to show the proper OTF font?

FontFamily="Edmondsans-Regular.otf#Edmondsans"

edmond

And this is how to show Edmond sans in regular, medium and bold weight:

<TextBlock Text="Edmondsans Regular" FontFamily="Edmondsans-Regular.otf#Edmondsans" />
<TextBlock Text="Edmondsans Medium" FontFamily="/Edmondsans-Medium.otf#Edmondsans" />
<TextBlock Text="Edmondsans Bold" FontFamily="/Edmondsans-Bold.otf#Edmondsans" />

all weights

Written by Loek van den Ouweland on 2015-05-20.
Questions regarding this artice? You can send them to the address below.