Using FontAwesome in Universal Apps

image_thumb2Want to use FontAwesome in Universal Apps (both Windows Phone & Windows 8.1). The procedure is similar to how you do it for WPF:

1) Install-Package FontAwesome

2) Mark the file /fonts/fontawesome-webfont.ttf with “Build Action” set to “Content” (not “Resource”)

3) Try out the font like this in a sample Windows Phone main page:

<Viewbox>
    <TextBlock Text="&#xf09b;"                 FontFamily="fonts/fontawesome-webfont.ttf#FontAwesome" />
</Viewbox>

And you should see:

image

Note that the steps and syntax is a bit different from how you do it in WPF.

No Comments