When it comes to tennis, the official "greatness measuring stick" used goes by how many grand slam tournaments a player won, not head-to-head records with other individual players: Federer is tied for first place of most grand slams ever won in the open era with Pete Sampras. Difference? Sampras only managed to win three out of the four while Federer has completed a career sweep thus putting Federer currently at first place.
As for head-to-head records. Has nothing to do with measuring greatness. Sampras had a negative head-to-head record against Richard Krajicek, a player no where near as accomplished as Nadal, among others. That phenomenon also applies to Laver, Borg, Agassi, Lendl, Connors, McEnroe, etc. Every great player has a guy (or guys) who they just seem to "have their number" as they say. At least Federer's negative head-to-heads are against top quality players like Murray and Nadal.
If tennis measured greatness based on head-to-head records. Then Richard Krajicek and Karol Kucera would be all time greats!