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.

This commit is contained in:
John Jenko 2021-11-01 14:41:44 +00:00
parent 0d27bd68e5
commit bcc2fb7378

View File

@ -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
}
}
}