Also people need to remember Federer, lives in Switzerland which is a tax haven for the rich. A lot of tennis players from Europe especially the French tennis players such as Monfils, Gasquet, Bartoli, ect. live in Switzerland because they don't pay taxes.
So since Federer lives in Switzerland he gets to keep almost all his money.
People say Federer makes a lot of money because he speaks English well but that's only a part of it. The other important parts is Federer is handsome, he isn't drop dead gorgeous like Tommy Haas but he's decent looking.
Federer has also kept a very clean image, the public doesn't know much about him he's very private. All people know is he's married to Mirka and he has two twin daughters and two loving parents.
So Federer's squeaky clean image of being the good Swiss family man is very attractive to advertisers.
Also, since Federer is multilingual and he can speak Swiss German, and French along with English he can reach more demographic markets.