Im interested in knowing how Text
decides where to put line breaks for text that can’t fit in a single line. Take for example this:
This simply wraps text to the next line. Now notice what happens when I put a “/” somewhere in the middle:
It prioritises breaking the line right after the “/”! The same thing happens if I choose to put a “|” somewhere in the middle.
Although all this just “makes sense” to me, I’m curious to know how this is calculated/determined. I am also curious to know if this can be manipulated in SwiftUI. For example in the first image, can I cause a line break right after “:” instead of wrapping around?
If anyone can shed light on how all of this is calculated or where I can find comprehensive information on the subject please do let me know. Additionally, if you know how to manipulate this behaviour in SwiftUI let me know.