B2015-122: Fix HLS underlining of subscript & superscript
This commit is contained in:
parent
5586849ebc
commit
6fceccc6c1
@ -299,11 +299,20 @@ namespace Volian.Print.Library
|
|||||||
chk.SetUnderline(font.Color, 0, 0.05F, 0, .3F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
chk.SetUnderline(font.Color, 0, 0.05F, 0, .3F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
||||||
if (visualText.Format.IsUnderline)
|
if (visualText.Format.IsUnderline)
|
||||||
if (visualText.Format.SuperScript < 0)
|
if (visualText.Format.SuperScript < 0)
|
||||||
;// Don't Underline Subscripts
|
{
|
||||||
//if (PrintOverride.CompressSub)
|
if (PrintOverride.CompressSub)
|
||||||
// chk.SetUnderline(font.Color, 0, 0.0666F, 0, -.425F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
{
|
||||||
//else
|
float yoffundx = (_MyParagraph.Leading < 12 && font.Size >= 12) ? -0.06F : -0.18F;
|
||||||
// chk.SetUnderline(font.Color, 0, 0.05F, 0, -.381F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
chk.SetUnderline(font.Color, 0, 0.07F, 0, yoffundx, 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 if (visualText.Format.SuperScript > 0 && PrintOverride.CompressSuper)
|
||||||
|
{
|
||||||
|
float yoffundx = (_MyParagraph.Leading < 12 && font.Size >= 12) ? -0.06F : -0.18F;
|
||||||
|
chk.SetUnderline(font.Color, 0, 0.07F, 0, yoffundx, PdfContentByte.LINE_CAP_ROUND);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If on a compressed printed step (Leading < 12) and a larger underlined font, then set the underlining
|
// If on a compressed printed step (Leading < 12) and a larger underlined font, then set the underlining
|
||||||
@ -334,7 +343,8 @@ namespace Volian.Print.Library
|
|||||||
chk.Font.Size *= .75f;
|
chk.Font.Size *= .75f;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chk.SetTextRise(-.25F * chk.Font.Size);
|
// if the subscript is not compressed or if it is compress but not underlined, then move it down
|
||||||
|
if (!PrintOverride.CompressSub || !visualText.Format.IsUnderline) chk.SetTextRise(-.25F * chk.Font.Size);
|
||||||
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user