B2015- 076: underlining overwrites text below (occurred on compressed steps with larger font)

This commit is contained in:
2015-06-22 14:42:46 +00:00
parent 7bc11c7fb6
commit a038fe06e9
3 changed files with 23 additions and 10 deletions

View File

@@ -227,12 +227,20 @@ namespace Volian.Print.Library
if (visualText.Format.IsUnderline)
if (visualText.Format.SuperScript < 0)
;// Don't Underline Subscripts
//if (PrintOverride.CompressSub)
// chk.SetUnderline(font.Color, 0, 0.0666F, 0, -.425F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
//else
// chk.SetUnderline(font.Color, 0, 0.05F, 0, -.381F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
//if (PrintOverride.CompressSub)
// chk.SetUnderline(font.Color, 0, 0.0666F, 0, -.425F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
//else
// chk.SetUnderline(font.Color, 0, 0.05F, 0, -.381F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
else
chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
{
// If on a compressed printed step (Leading < 12) and a larger underlined font, then set the underlining
// a little less far down the page. Without this, the underline was touching the 2nd line of text, if it existed.
// 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;
chk.SetUnderline(font.Color, 0, 0.05F, 0, yoffund, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
}
if (visualText.Format.SuperScript > 0)
{
if (PrintOverride.CompressPropSubSup)