C2021-052 Made the underline thicker when the text being underlined is bolded. (when printed)

This commit is contained in:
John Jenko 2021-11-10 14:35:57 +00:00
parent 4e290ae4ff
commit a4eb5935ba

View File

@ -567,6 +567,9 @@ namespace Volian.Print.Library
// Any plant that had compressed steps with the font size/underline would have this problem. An example
// was Braidwood FSG-6, high level steps.
float yoffund = (_MyParagraph.Leading < 12 && font.Size >= 12) ? -0.06F : -0.131F;
if(chk.Font.BaseFont.PostscriptFontName.ToUpper().Contains("BOLD")) // C2021-052 make underline thicker if text is bolded
chk.SetUnderline(font.Color, 0, 0.12F, 0, yoffund, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
else
chk.SetUnderline(font.Color, 0, 0.05F, 0, yoffund, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
}