From 6bcbe25d4e09f61da54302af55225040cb7a8862 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 21 Feb 2014 17:11:17 +0000 Subject: [PATCH] Fixed logic so the superscripted text is not underlined. --- PROMS/Volian.Print.Library/Rtf2iTextSharp.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs b/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs index 7d682e6a..3a22fb54 100644 --- a/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs +++ b/PROMS/Volian.Print.Library/Rtf2iTextSharp.cs @@ -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);