ODTTF obfuscation files. To use them as TTF, you must render them harmless. You can use this code:
void DeobfuscateFont(XpsFont font, string outname)
{
using (Stream stm = font.GetStream())
{
using (FileStream fs = new FileStream(outname, FileMode.Create))
{
byte[] dta = new byte[stm.Length];
stm.Read(dta, 0, dta.Length);
if (font.IsObfuscated)
{
string guid = new Guid(font.Uri.GetFileName().Split('.')[0]).ToString("N");
byte[] guidBytes = new byte[16];
for (int i = 0; i < guidBytes.Length; i++)
guidBytes[i] = Convert.ToByte(guid.Substring(i * 2, 2), 16);
for (int i = 0; i < 32; i++)
{
int gi = guidBytes.Length - (i % guidBytes.Length) - 1;
dta[i] ^= guidBytes[gi];
}
}
fs.Write(dta, 0, dta.Length);
}
}
}
After writing in the .TTF file this way you can use the font. Note that fonts in XPS files are subsets containing only those characters that are actually used in the XPS file, so they will not be useful for use, say, in MS-Word as a font.
source
share