8000 use current line descent for calculated line height · mowebtech/DTCoreText@72af4a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 72af4a1

Browse files
committed
use current line descent for calculated line height
1 parent e37e3ba commit 72af4a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Core/Source/DTCoreTextLayoutFrame.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ - (void)_buildLinesWithTypesetter
265265
{
266266
if (lineHeight==0)
267267
{
268-
lineHeight = previousLineMetrics.descent + currentLineMetrics.ascent;
268+
lineHeight = currentLineMetrics.descent + currentLineMetrics.ascent;
269269
}
270270

271271
if (isAtBeginOfParagraph)
@@ -1210,7 +1210,7 @@ - (CGPoint)baselineOriginToPositionLine:(DTCoreTextLayoutLine *)line afterLine:(
12101210
// is absolute line height set?
12111211
if (lineHeight==0)
12121212
{
1213-
lineHeight = previousLine.descent + line.ascent + usedLeading;
1213+
lineHeight = line.descent + line.ascent + usedLeading;
12141214
}
12151215

12161216
if ([self isLineLastInParagraph:previousLine])

0 commit comments

Comments
 (0)
0