Posted by a ceTe Software moderator
Hello,
The OTF and TTF are different font types and the characteristics may be different. There could be a difference in the way they display the text even though the name of the font is same.
If you would like to embed an OTF or TTF font in the PDF then you will need to load a TTF or OTF font into an OpenTypeFont object. Set the Embed property to true and Subset to false then use it in your page elements. Here is some sample code:
Document document1 = new Document();
Page page1 = new Page();
document1.Pages.Add(page1);
OpenTypeFont font1 = new OpenTypeFont(@"TTF or OTF font file path");
font1.Embed = true;
font1.Subset = false;
//TextArea with fully embeddd Font.
TextArea txt1 = new TextArea("Embedd: ", 20, 40, 200, 100);
txt1.Font = font1;
txt1.FontSize = 8.0f;
page1.Elements.Add(txt1);
string output1 = @"File path to save the PDF ";
document1.Draw(output1);
Thanks,
ceTe Software Support Team