From bcc2fb7378de1f3eb8341b14a2f95e7215851f12 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 1 Nov 2021 14:41:44 +0000 Subject: [PATCH] B2021-133 BNPP Alarms - The ReplaceWords in pagelist is not restoring the font size after doing a superscript or subscript. Needed to reset the font size when the superscript or subscript is turned off. --- PROMS/Volian.Svg.Library/iTextSharp.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Svg.Library/iTextSharp.cs b/PROMS/Volian.Svg.Library/iTextSharp.cs index d85d4675..04c2055e 100644 --- a/PROMS/Volian.Svg.Library/iTextSharp.cs +++ b/PROMS/Volian.Svg.Library/iTextSharp.cs @@ -749,12 +749,18 @@ namespace Volian.Svg.Library fontUnderline = false; else if (m.Value.Contains(@"\ul")) fontUnderline = true; - if (m.Value.Contains(@"\up0") || m.Value.Contains(@"\dn0")) fontTextRise = 0; + if (m.Value.Contains(@"\up0") || m.Value.Contains(@"\dn0")) + { + fontTextRise = 0; + // B2021-133 need to reset the font size after doing a compressed super or sub script + if (CompressSuper || CompressPropSubSup || CompressSub) + font = FontFactory.GetFont(font.Familyname, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, fontSize, fontStyle, new Color(FillColor)); ; + } else if (m.Value.Contains(@"\up")) { fontTextRise = .25F; // F2021-053: Do replace words for Page List items. size and locate superscript - if (CompressSuper || CompressPropSubSup) + if (CompressSuper || CompressPropSubSup) { font = FontFactory.GetFont(font.Familyname, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, fontSize * .75f, fontStyle, new Color(FillColor)); ; fontTextRise = .33F; @@ -1428,4 +1434,4 @@ namespace Volian.Svg.Library Text2 = 3, Hash = 4 } -} \ No newline at end of file +}