In the text, I need to add bold formatting, using a secondary font:
- Code: Select all
String fontFileName = "DeeDeeFlowers.ttf";
PdfTrueTypeFont trueTypeFont = new PdfTrueTypeFont(fontFileName, 20f);
I've set htmlTags to true, and output the content as:
- Code: Select all
newPage.Canvas.DrawString("Test string with <b>bold</b> type", trueTypeFont, new PdfSolidBrush(Color.Black), 10, 10, true);
All text displays fine with custom font, except the <b> section, which uses some system font.
I have other ttf font files for italic and bold fonts, so question is, can I somehow create a custom font-family to use?