Blog Archives

Using Custom Fonts in Windows store applications

While doing Windows Store application development, one might come to a point where he/she want to use a custom font to do styling in their applications rather than using a font that comes with Windows & its SDK.

The procedure to use a custom font is very simple and it can be done by following the below steps. 

  • Add your custom font (.ttf or any other format) into your application assets by right clicking on your project in Solution Explorer > Add New Item > Existing Item.
     
  • Modify the property of FontFamily of your control to 


    FontFamily=”/Assets/BuxtonSketch.ttf#Buxton Sketch” 

    Where BuxtonSketch.ttf is your font file name and its actual name (Buxton Sketch) after the “#”.

Complete code snippet is 
<TextBlock x:Name=”pageTitle” Text=”Application Name” Style=”{StaticResource PageHeaderTextStyle}” FontFamily=”/Assets/BuxtonSketch.ttf#Buxton Sketch”/>
Thanks