Fixed logic so the superscripted text is not underlined.

This commit is contained in:
Rich 2014-02-21 17:11:17 +00:00
parent 13550d1b19
commit 6bcbe25d4e

View File

@ -195,7 +195,14 @@ namespace Volian.Print.Library
if (visualText.Format.IsStrikeThrough)
chk.SetUnderline(font.Color, 0, 0.05F, 0, .3F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
if (visualText.Format.IsUnderline)
chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
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
else
chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
if (visualText.Format.SuperScript > 0)
{
chk.SetTextRise(.25F * chk.Font.Size);