Embed true type font in silverlight and use it in textblock

To embed fonts, you add the font file (typically, a file with the extension .ttf) to your application and set Build Action to Resource.
To set the FontFamily property, you need to use this format:

FontFileName#FontName

For example, if you have a font file named Myw3Font.ttf and it includes a font named FFFont, you would use markup like this:

<TextBlock FontFamily="Myw3Font.ttf#FFFont" >This is an embedded font</TextBlock>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.