F2021-053: BNPP Alarm – need ability to have super/sub scripts in the text of Alarm Tables (ROs)
This commit is contained in:
@@ -681,7 +681,10 @@ namespace Volian.Svg.Library
|
||||
ct.Go();
|
||||
cb.RestoreState();
|
||||
}
|
||||
|
||||
// F2021-053: Do replace words for Page List items. Format flags to use for compressing and locating sub/super scripts
|
||||
public static bool CompressSuper = false;
|
||||
public static bool CompressSub = false;
|
||||
public static bool CompressPropSubSup = false;
|
||||
private Phrase BuildPhrase(string text, float fontSize, int fontStyle, iTextSharp.text.Font font)
|
||||
{
|
||||
//if (text == "Caution")
|
||||
@@ -747,8 +750,23 @@ namespace Volian.Svg.Library
|
||||
else if (m.Value.Contains(@"\ul"))
|
||||
fontUnderline = true;
|
||||
if (m.Value.Contains(@"\up0") || m.Value.Contains(@"\dn0")) fontTextRise = 0;
|
||||
else if (m.Value.Contains(@"\up")) fontTextRise = .25F;
|
||||
else if (m.Value.Contains(@"\dn")) fontTextRise = -.25F;
|
||||
else if (m.Value.Contains(@"\up"))
|
||||
{
|
||||
fontTextRise = .25F;
|
||||
// F2021-053: Do replace words for Page List items. size and locate superscript
|
||||
if (CompressSuper || CompressPropSubSup)
|
||||
{
|
||||
font = FontFactory.GetFont(font.Familyname, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, fontSize * .75f, fontStyle, new Color(FillColor)); ;
|
||||
fontTextRise = .33F;
|
||||
}
|
||||
}
|
||||
else if (m.Value.Contains(@"\dn"))
|
||||
{
|
||||
fontTextRise = -.25F;
|
||||
// F2021-053: Do replace words for Page List items. size subscript
|
||||
if (CompressSub || CompressPropSubSup)
|
||||
font = FontFactory.GetFont(font.Familyname, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, fontSize * .75f, fontStyle, new Color(FillColor)); ;
|
||||
}
|
||||
if (m.Value.Contains(@"\b0"))
|
||||
{
|
||||
fontStyle ^= iTextSharp.text.Font.BOLD;
|
||||
|
Reference in New Issue
Block a user