Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,11 @@ - (TextMeasurement)_measureTextStorage:(NSTextStorage *)textStorage
size.height = enumeratedLinesHeight;
}

size = (CGSize){ceil(size.width * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor,
ceil(size.height * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor};
// Wrapped text needs one extra physical pixel so its final line remains visible after layout rounding.
CGFloat additionalHeightInPixels = textDidWrap ? 1.0 : 0.0;
size = (CGSize){
ceil(size.width * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor,
(ceil(size.height * layoutContext.pointScaleFactor) + additionalHeightInPixels) / layoutContext.pointScaleFactor};

NSRange visibleGlyphRange = [layoutManager glyphRangeForTextContainer:textContainer];

Expand Down
Loading