There are multiple options to embed your fonts in Silverlight 2:
1. Using font as "Content"
First, embed the font as "Content" (see Properties, Build action). With this option, you can use the following method to set the font:
The "problem" with this can be that the fontfile is embedded in the .XAP file. Therefore is available to anyone who wants to use the fontfile:
2. Using font as "Embedded Resource"
The advantage of using this method is that the fontfile is compiled with the DLL. So this makes it hard (maybe even impossible?) to retrieve the fontfile.
If it is still possible (maybe with a decompiler), at least it makes it less easy to get it.
When you want to use this method, first set the Build action to "Embedded Resource".
3. Using font as a downloadable object
This has no real advantages to the above mentioned methods. Maybe if you use a font across multiple sites or something...
First, copy the font file to the ClientBin folder and use a WebClient to download the font:
When the async request is completed, set the font:
That's it for now!