Posted by a ceTe Software moderator
Hello,
In our API there is no equivalent of italic (I) button available in MS Word. The "Lucida Calligraphy Italic (LCALLIG.TTF) is already an italic font. If you run the below code you will notice the difference between the italic font and the regular font “Lucida Console Regular”. MS Word seems to be further italicizing the already italic font when you use the italic button and it is not possible to do the same in our API.
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
OpenTypeFont italicFont = new OpenTypeFont(@"C:\Windows\Fonts\LCALLIG.TTF"); //Lucida Calligraphy Italic
TextArea textArea = new TextArea("This is text of a TextArea", 0, 100, 400, 30, italicFont, 18);
OpenTypeFont regularFont = new OpenTypeFont(@"C:\Windows\Fonts\lucon.TTF"); //Lucida Console Regular
TextArea textArea1 = new TextArea("This is text of a TextArea", 0, 200, 400, 30, regularFont, 18);
page.Elements.Add(textArea);
page.Elements.Add(textArea1);
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.