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”/>

About Muhammad Umer

I love to work on emerging technologies, i am currently associated with Microsoft as Technology Consultant.

Posted on July 20, 2013, in Uncategorized and tagged , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: