Reputation: 459
I made an App for iOS and MacOS and I am now working on the tvOS version. The issue I am facing is that the custom font is not working when I use the following code for tvOS!
import SwiftUI
struct TestView: View {
var body: some View {
Text("R")
.font(.custom("Arial Rounded MT Bold", size: 160))
.bold()
.shadow(color: Color.black, radius: 15, x: 15, y: 5)
.foregroundColor(Color(red: 255 / 255.0, green: 194 / 255.0, blue: 58 / 255.0))
}
}
struct TestView_Previews: PreviewProvider {
static var previews: some View {
TestView()
}
}
The wrong result with the above code is the below letter:
The good letter that should be displayed by the above code should look like the one below:
What am I missing? Thanks
Upvotes: 1
Views: 408
Reputation: 1474
You are right that works for iOS & macOS but doesn't work for tvOS. Maybe because there are different built-in fonts available for iOS and tvOS? I don't have expertise in tvOS, so please don't assume I'm right. I'm guessing it from this available font list.
tvOS: Try something from this list, and I'm sure it'll work.
iOS:
Upvotes: 1