public static void TrueTypeFont()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_AsposePdfGenerator_Text();
// Instantiate Pdf instance by calling it empty constructor
Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
// Create a section in the Pdf object
Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
// ExStart:TrueTypeFont
// Create a text object in the section
Aspose.Pdf.Generator.Text t1 = new Aspose.Pdf.Generator.Text(sec1, "Courier New Bold font");
// Set font name of a specific text segment to courier new
t1.Segments[0].TextInfo.FontName = "Courier New";
// ExEnd:TrueTypeFont
dataDir = dataDir + "TrueTypeFont_out.pdf";
// Create the result PDF Document
pdf1.Save(dataDir);
}
public static void Unicode()