Thanks, Gong, for sharing this workaround, it was very helpful! It inspired me to create a slightly simpler solution without having to convert the emoji to an image. The key is the .luminanceToAlpha() modifier. Additionally I had to add a black background, otherwise the edge was jagged. But the background is transparent in the end result.
Text("😄")
.background(Color.black)
.compositingGroup()
.luminanceToAlpha()
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: