Skip to content

Commit 64edd30

Browse files
fix line-height bug when smaller than font-size
1 parent 42ffaa5 commit 64edd30

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

HtmlRendererCoreNet7.PdfSharp/Core/Dom/CssLayoutEngine.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@ private static void FlowBox(RGraphics g, CssBox blockbox, CssBox box, double lim
270270
&& (b.WhiteSpace != CssConstants.PreWrap || !word.IsSpaces))
271271
|| word.IsLineBreak || wrapNoWrapBox)
272272
{
273-
// if (box.ActualLineHeight > 0 && box.ActualLineHeight < word.Height)
274-
// {
275-
// maxbottom = maxbottom - word.Height + box.ActualLineHeight;
276-
// }
273+
if (box.ActualLineHeight > 0 && box.ActualLineHeight < word.Height)
274+
{
275+
word.Bottom = word.Bottom - word.Height + box.ActualLineHeight;
276+
}
277277

278278
wrapNoWrapBox = false;
279279
curx = startx;

HtmlRendererCoreNet7.PdfSharp/HtmlRendererCoreNet7.PdfSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<RepositoryUrl>https://github.com/manuel3108/HtmlRendererCore-Net7</RepositoryUrl>
1111
<Description>HtmlRendererCore-Net7 is a partial port of HtmlRenderer for .NET Core.</Description>
1212
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
13-
<Version>2.0.10</Version>
13+
<Version>2.0.11</Version>
1414
<RootNamespace>HtmlRendererCore.PdfSharp</RootNamespace>
1515
</PropertyGroup>
1616

0 commit comments

Comments
 (0)