B2017-112: Figures in Supplemental Information pages overlap text if text font is shrunk
This commit is contained in:
parent
2723d5d6a7
commit
83d746edfd
@ -1845,22 +1845,26 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
float hBefore = pg.Height;// Save initial paragraph height
|
float hBefore = pg.Height;// Save initial paragraph height
|
||||||
AdjustSupInfoTable(pg, scaler,cb);
|
AdjustSupInfoTable(pg, scaler,cb);
|
||||||
NewSupInfoFixChunks(pg,scaler);// Apply multiplier to font size
|
// B2017-112: Don't do the font size change if images.
|
||||||
pg.IParagraph.Leading = scaler * pg.IParagraph.Leading; // Adjust leading (line spacing)
|
if (pg.ImageText == null)
|
||||||
float hAfter = pg.GetParagraphHeight(cb, pg.IParagraph, "", pg.Width); // Calculate new paragraph height
|
|
||||||
pg.Height = hAfter; // Save new Height;
|
|
||||||
pg.YBottomMost += hAfter - hBefore; // Adjust YbottomMost for font size and leading
|
|
||||||
float hleading = hBefore * scaler; // Calcuate leading change
|
|
||||||
// If the change in font size effects the paragraph height due to word wrapping save the impact to adjust
|
|
||||||
// Offsets below
|
|
||||||
if ((hleading > hAfter + 1 && scaler < 1f) || (hleading < hAfter + 1 && scaler > 1f))
|
|
||||||
{
|
{
|
||||||
if (!_AdjustForParagraphShrinkage.ContainsKey(pg.YOffset))
|
NewSupInfoFixChunks(pg, scaler);// Apply multiplier to font size
|
||||||
_AdjustForParagraphShrinkage.Add(pg.YOffset, hleading - hAfter);
|
pg.IParagraph.Leading = scaler * pg.IParagraph.Leading; // Adjust leading (line spacing)
|
||||||
|
float hAfter = pg.GetParagraphHeight(cb, pg.IParagraph, "", pg.Width); // Calculate new paragraph height
|
||||||
|
pg.Height = hAfter; // Save new Height;
|
||||||
|
pg.YBottomMost += hAfter - hBefore; // Adjust YbottomMost for font size and leading
|
||||||
|
float hleading = hBefore * scaler; // Calcuate leading change
|
||||||
|
// If the change in font size effects the paragraph height due to word wrapping save the impact to adjust
|
||||||
|
// Offsets below
|
||||||
|
if ((hleading > hAfter + 1 && scaler < 1f) || (hleading < hAfter + 1 && scaler > 1f))
|
||||||
|
{
|
||||||
|
if (!_AdjustForParagraphShrinkage.ContainsKey(pg.YOffset))
|
||||||
|
_AdjustForParagraphShrinkage.Add(pg.YOffset, hleading - hAfter);
|
||||||
|
}
|
||||||
|
float yoBefore = pg.YOffset;// Save the offset before
|
||||||
|
float yoAfter = pg.YOffset = NewSupInfoFixOffset(pg, scaler);// Calculate the offset after
|
||||||
|
pg.YBottomMost += yoAfter - yoBefore;// Adjust YbottomMost for changes to yOffset
|
||||||
}
|
}
|
||||||
float yoBefore = pg.YOffset;// Save the offset before
|
|
||||||
float yoAfter = pg.YOffset = NewSupInfoFixOffset(pg,scaler);// Calculate the offset after
|
|
||||||
pg.YBottomMost += yoAfter - yoBefore;// Adjust YbottomMost for changes to yOffset
|
|
||||||
foreach (vlnParagraph cpg in pg.ChildrenAbove)// Process Children Above
|
foreach (vlnParagraph cpg in pg.ChildrenAbove)// Process Children Above
|
||||||
ReduceSupInfoGroupFontSize(cpg, scaler, cb);
|
ReduceSupInfoGroupFontSize(cpg, scaler, cb);
|
||||||
foreach (vlnParagraph cpg in pg.ChildrenBelow)// Process Children Below
|
foreach (vlnParagraph cpg in pg.ChildrenBelow)// Process Children Below
|
||||||
|
Loading…
x
Reference in New Issue
Block a user