If I add a subscript character to my Text view, SwiftUI is cutting it like if it's not calculating its size.
The solution is to dynamically add about 3 height points to the view size (maybe with a GeometryReader) but I don't know how to achieve it.
The solution is to dynamically add about 3 height points to the view size (maybe with a GeometryReader) but I don't know how to achieve it.
Thanks for showing the issue-reproducible code.
I do not have a font named Lato-bold nor a Color primaryColor, but could have confirmed that what you have described did happen with some specific fonts.
Can't you use baselineOffset modifier?
I do not have a font named Lato-bold nor a Color primaryColor, but could have confirmed that what you have described did happen with some specific fonts.
Can't you use baselineOffset modifier?
Code Block Text("\(quiz.question)") .font(.custom("Lato-Bold", size: 17)) .baselineOffset(5) //<- .foregroundColor(Color.red/*("primaryColor")*/) .multilineTextAlignment(.center) .fixedSize(horizontal: false, vertical: true) .lineLimit(nil) .padding(.horizontal)