Fixed text rendering (spacing corner case)
This commit is contained in:
@@ -181,7 +181,7 @@ namespace QuestPDF.Examples
|
||||
|
||||
stack.Item().Text(text =>
|
||||
{
|
||||
text.ParagraphSpacing(10);
|
||||
text.ParagraphSpacing(5);
|
||||
text.Span(content, normalStyle);
|
||||
});
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace QuestPDF.Elements
|
||||
return;
|
||||
|
||||
var firstHeight = firstSize?.Height ?? 0;
|
||||
var spaceForSecond = new Size(availableSpace.Width, availableSpace.Height - firstHeight + Size.Epsilon);
|
||||
var spaceForSecond = new Size(availableSpace.Width, availableSpace.Height - firstHeight);
|
||||
var secondMeasurement = Second?.Measure(spaceForSecond) as Size;
|
||||
|
||||
if (secondMeasurement == null)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace QuestPDF.Elements.Text
|
||||
var width = lines.Max(x => x.Width);
|
||||
var height = lines.Sum(x => x.LineHeight);
|
||||
|
||||
if (width > availableSpace.Width || height > availableSpace.Height)
|
||||
if (width > availableSpace.Width + Size.Epsilon || height > availableSpace.Height + Size.Epsilon)
|
||||
return new Wrap();
|
||||
|
||||
var fullyRenderedItemsCount = lines
|
||||
|
||||
Reference in New Issue
Block a user