I'm trying to work our if it's possible to display text in a Shape
so that the text it not rectangular but the same as the shape it's self.
I have tried
Text(loremIpsum)
.font(Font.system(size: 14))
.clipShape(Circle())
which the result was that I'm not seeing new lines when text reaches the edge of the shape.
I then tried to use the circle first and add text to that but that resulted in text appearing outside the circle.
Circle()
.stroke(Color.black, lineWidth: 2)
.padding(6)
.overlay(
Text(loremIpsum)
.font(Font.system(size: 14))
)
I'm wanting to achieve Text that fits perfectly into whatever Shape
I use. Is this possible?
The question suggested here does not answer my question sadly. hat just fits text into a Shape
but still retains a rectangular frame. I'm trying to make text exactly match the shape I am placing it in.