Missing characters in SCNText (iOS 14)

The following code creates a SCNText  node and attaches it to the root node of the ARKit scene:

Code Block Swift
let font: UIFont = UIFont.systemFont(ofSize: fontSize, weight: UIFont.Weight.regular)
let attributes: [NSAttributedString.Key : Any]? = [NSAttributedString.Key.font: font]
let text = NSAttributedString(string: "abcdefghijklmnopqrstuvwxyz:123456789", attributes: attributes)
let textGeometry = SCNText(string: text, extrusionDepth: 0.1)
let textNode = SCNNode(geometry: textGeometry)
rootNode.addChildNode(textNode)

When I run it either in the simulator or on the device with iOS14, I get a text with missing some characters (e.g. "a", "e", "y").

It works fine when I use regular String as an input param of SCNText.init() but does not work with NSAttributedString  which uses system font. It works fine in iOS13 though.

It looks like a bug in SCNText but also I might have done something wrong. Have you encountered a similar issue?

The sample Xcode project showing this issue can be found here.

And here is the same thread on Stack Overflow.
Please file a bug report for this issue using Feedback Assistant if you have not already done so.
As you have noted, you can use a different font to work around this issue until a fix is available.

Thanks!

Wow, still a bug in iOS 16. Maybe you can fix in iOS 17??

Missing characters in SCNText (iOS 14)
 
 
Q