Post

Replies

Boosts

Views

Activity

Missing characters in SCNText (iOS 14)
The following code creates a SCNText  node and attaches it to the root node of the ARKit scene: 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. - https://github.com/pleszkiewicz/SCNTextDemo And here - https://stackoverflow.com/questions/64448087/missing-characters-in-scntext-ios-14 is the same thread on Stack Overflow.
2
1
576
Oct ’20