public static void TrueTypeBoldFont()
{
// 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:TrueTypeBoldFont
// 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";
// Set the font to bold
t1.Segments[0].TextInfo.IsTrueTypeFontBold = true;
// ExEnd:TrueTypeBoldFont
dataDir = dataDir + "TrueTypeBoldFont_out.pdf";
// Create the result PDF Document
pdf1.Save(dataDir);
}
public static void TrueTypeFont()