0
com.lowagie.text.Font font = FontFactory.getFont(str7, "Cp1252", true, (float)Convert.ToInt32(str8), num8, this.color);

Century gothic font does not get selected by this command as I set str7 to century gothic font.

Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54

1 Answers1

2

A few remarks about your code:

  1. Whenever you see com.lowagie in a code snippet, you should know that snippet is out of date. That version is unsupported.
  2. Try reproducing your problem with iText7. It's the latest version of iText. It's AGPL licensed.
  3. There are tons of examples on the website for working with fonts. Go to https://developers.itextpdf.com/content/itext-7-examples/itext-7-font-examples
  4. Updating in this case might well fix your problem. A lot of effort was spent on code related to fonts.
Joris Schellekens
  • 8,483
  • 2
  • 23
  • 54