Skip to content

Commit

Permalink
Fix text layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac committed Mar 5, 2024
1 parent 85c81a1 commit ebd7459
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion submodules/Display/Source/TextNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,8 @@ open class TextNode: ASDisplayNode {
let line = CTTypesetterCreateLine(typesetter, CFRange(location: currentLineStartIndex, length: lineCharacterCount))
var lineAscent: CGFloat = 0.0
var lineDescent: CGFloat = 0.0
let lineWidth = CTLineGetTypographicBounds(line, &lineAscent, &lineDescent, nil)
var lineWidth = CTLineGetTypographicBounds(line, &lineAscent, &lineDescent, nil)
lineWidth = min(lineWidth, constrainedSegmentWidth - additionalSegmentRightInset)

var isRTL = false
let glyphRuns = CTLineGetGlyphRuns(line) as NSArray
Expand Down

0 comments on commit ebd7459

Please sign in to comment.