Added flag CompressPropSubSup for compressing proportional fonts sub & superscript (used by Calvert)
Use CompressPropSubSup Use CompressPropSubSup
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
public static bool CompressSub = false;
|
||||
public static bool CompressSuper = false;
|
||||
public static bool CompressPropSubSup = false;
|
||||
private static System.Drawing.Color _TextColor = System.Drawing.Color.Empty;
|
||||
public static System.Drawing.Color TextColor
|
||||
{
|
||||
@@ -205,13 +206,27 @@ namespace Volian.Print.Library
|
||||
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);
|
||||
if (PrintOverride.CompressSuper) chk.Font.Size = 9;
|
||||
if (PrintOverride.CompressPropSubSup)
|
||||
{
|
||||
chk.SetTextRise(.33F * chk.Font.Size);
|
||||
chk.Font.Size *= .5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
chk.SetTextRise(.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSuper) chk.Font.Size = 9;
|
||||
}
|
||||
|
||||
}
|
||||
else if (visualText.Format.SuperScript < 0)
|
||||
{
|
||||
chk.SetTextRise(-.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
||||
if (PrintOverride.CompressPropSubSup)
|
||||
chk.Font.Size *= .5f;
|
||||
else
|
||||
{
|
||||
chk.SetTextRise(-.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
||||
}
|
||||
}
|
||||
else
|
||||
chk.SetTextRise(0);
|
||||
|
Reference in New Issue
Block a user