Hi, after reading the topics about using private fonts, i decided to switch from GDI+ to WPF version of PDFSharp.
I'm trying to use a specific font in our pdf document.
I adapted the demo app and it shows the font just fine.
My problem is that i need to use it in a web application.
There i allways get the exception "Font with the specified family name does not exist." (XPrivateFontCollection.cs line 248)
Is there a special need that i'm not aware of to get my font picked up ?
This is the code i'm using:
Code:
XPrivateFontCollection globalFontCollection = XPrivateFontCollection.Global;
// Without the following line of code the Uri constructor (see below) fails...
new System.Windows.Application();
Uri uri = new Uri("pack://application:,,,/");
const string name = "./fonts/#Echelon";
globalFontCollection.Add(uri, name);
Any help would be greatly appreciated !
Thanks, Alain.