diff --git a/README.md b/README.md index 68e6582..8ed114d 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ func boundingRect(for range: NSRange) -> CGRect? func enumerateLineFragments(for rect: CGRect, strictIntersection: Bool = true, options: NSTextLayoutFragment.EnumerationOptions = [], block: (CGRect, NSRange, inout Bool) -> Void) func enumerateLineFragments(in range: NSRange, options: NSTextLayoutFragment.EnumerationOptions = [], block: (CGRect, NSRange, inout Bool) -> Void) func enumerateLineFragments(from index: Int, options: NSTextLayoutFragment.EnumerationOptions = [], block: (CGRect, NSRange, inout Bool) -> Void) +func boundingRect(for range: NSRange) -> CGRect? ``` ### `NSTextLayoutFragment` Additions diff --git a/Sources/Glyph/NSTextLayoutManager+Additions.swift b/Sources/Glyph/NSTextLayoutManager+Additions.swift index f540f92..69393a3 100644 --- a/Sources/Glyph/NSTextLayoutManager+Additions.swift +++ b/Sources/Glyph/NSTextLayoutManager+Additions.swift @@ -176,7 +176,7 @@ extension NSTextLayoutManager { } } - func boundingRect(for range: NSRange) -> CGRect? { + public func boundingRect(for range: NSRange) -> CGRect? { var rect: CGRect? = nil enumerateTextLineFragments(in: range, options: [.ensuresLayout]) { fragment, lineFragment, lineRect, lineRange, stop in