I am currently working on a little piece of code which generates a PDF file. To follow the design specification, I need to use the 'Helvetica Neue Condensed Bold' font. As where the program will run, there is no font installation available I need to use it as a private font.
It does not work. I tried different family names and such, but I keep failing over and over...
byte[] data = File.ReadAllBytes(fontUri);
XPrivateFontCollection.Global.AddFont(data, "#Helvetica Neue Condensed Bold");
And when I want to use the font.
XFont big = new XFont("Helvetica Neue Condensed Bold", 36, XFontStyle.Regular);
But this keeps failing over and over again. I have imported the file into my project, it is a .ttf file. I cannot figure it out.
Is there anyone who knows my issue and maybe knows what I am doing wrong?