In this tutorial I will show how to embed a font in Silverlight and show the increase in file size that will occur when doing so.
Placing a Textblock component on the stage and using a built-in Silverlight font such as “Arial” the xap file created will be 4 kb. However, if try to use a font such as “Myriad Pro” when you view the results panel you will see a message “The font, Myriad Pro, isn’t a built-in Silverlight font. You must embed this font for it to display in your Silverlight Application.”
Embedding a font is as simple as selecting the “Embed” checkbox in the text properties panel.
One thing to note when embedding the font “Myriad Pro” the xap file size becomes 831 kb.
<TextBlock FontFamily="Fonts/Fonts.zip#Myriad Pro" FontSize="16" Foreground="White" Text="TextBlock" TextAlignment="Center" TextWrapping="Wrap"/>