Starting macOS 15/iOS 18 TextKit 2 extra line frame is more broken (height always been broken) than previously. The same code return different values when run on macOS 14/iOS 17 and macOS 15/iOS 18.
The problem is that extra line fragment (NSTextLineFragment) origin and size is incorrect. I sketch the problem with the code snippet below:
// Storage
let textContentManager = NSTextContentStorage()
// Layout