Posted by a ceTe Software moderator
Hello,
You can embed any OTF or TTF fonts using the OpenTypeFont class. You will then specify this font object in your page elements (Label, TextArea, etc.). Please refer to the documentation on fonts and text
here.
Here is a code sample to embed a font in a document.
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
OpenTypeFont myFont = new OpenTypeFont("OTF or TTF font file path");
fontObj.Embed = true;
fontObj.Subset = false;
TextArea area1 = new TextArea("Test to add font", 0, 50, 200, 50, myFont, 12);
page.Elements.Add(area1);
document.Draw(@"Path to save the document");
Thanks,
ceTe Software Support Team