The following code creates a SCNText node and attaches it to the root node of the ARKit scene:
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.
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.