go to youtube ang search for analysis of Federer first serve vs second serve and study the tapes. Spin is a result of the strings brushing across the ball at contact. The more angle across the ball at contact, the more spin. You'll see from the videos that Federer swings up and across on both his serves. The difference is there is more brush angle on his 2nd serve vs is 1st serve. He also tosses the ball closer to his body and more at 11:30 (to his L) for a 2nd serve. But, he still get up and across in his racket swing path when he toss more to the R and in front for a 1st serve
Federer rarely hits a flat first serve.