Custom Font not working

I added a custom font named Lemon-Regular, its a ttf file and I made sure that the project is checked in the font's target ownership and that it also occurs in the resources in build phases. The code doesnt throw up any error but the font itself is not being rendered. This is my code
Text(text)
  .font(.custom("Lemon-Regular", size: 24))
  .frame(width: 200, height: 50)
  .foregroundStyle(isButtonClicked ? .black : .white)
  .background(isButtonClicked ? .white : .clear)
  .border(.white, width: 1.5)
  .cornerRadius(5)
Was this page helpful?