Thursday, March 4, 2010

Silverlight Tutorial - Obfuscating Fonts

** This post will not interest my usual readers**

However, if you are interested in obfuscating/protecting your fonts in a Silverlight app, read on.

Here's the basic steps that I'll show in the video tutorial:

· Create Microsoft Word Document
· Change the font to the desired font type
· Print to XPS file
· Change the XPS file extension to .zip
· Open zip file and navigate to Fonts directory (eg: somezipfile.zip\Documents\1\Resources\Fonts)
· Copy the ODTTF file (***DO NOT CHANGE THE NAME OF THE ODTTF FILE***)
· If more than one font is required you can add several to a zip file
· In the Silverlight project (not the associated web project) include the ODTTF, or zip file using “Add -> Existing Item”
· Click on the newly added file and go to properties
· Change the “Build Action” to Resource
· In the Xaml file you can now add controls with the FontFamily set
· Compile
· You may need to launch the site in the debugger to see the fonts for the first time, but after that they should show up in the designer


No comments: