Skip to content

Commit

Permalink
Fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali committed Jul 18, 2023
1 parent 1adee04 commit 63edb12
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion submodules/Display/Source/TextNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,12 @@ open class TextNode: ASDisplayNode {
var effectiveLineRange = brokenLineRange
var additionalTrailingLine: (CTLine, Double)?

if lineRange.length == 0 || (CTLineGetTypographicBounds(originalLine, nil, nil, nil) - CTLineGetTrailingWhitespaceWidth(originalLine) + truncationTokenWidth) < Double(lineConstrainedSize.width) {
var measureFitWidth = CTLineGetTypographicBounds(originalLine, nil, nil, nil) - CTLineGetTrailingWhitespaceWidth(originalLine)
if customTruncationToken != nil {
measureFitWidth += truncationTokenWidth
}

if lineRange.length == 0 || measureFitWidth < Double(lineConstrainedSize.width) {
if didClipLinebreak {
if lineRange.length == 0 {
coreTextLine = CTLineCreateWithAttributedString(NSAttributedString())
Expand Down

0 comments on commit 63edb12

Please sign in to comment.