See that's why I tend to think that Federer is more known than Kobe/Lebron (not talking about Jordan obviously). Due to the 'unified' tour, if a country is remotely interested in tennis, they will get exposure to Federer, Nadal etc. All the top pros end up visiting various countries in the world. Whereas with basketball as you state, it's very different.
However I have no doubt that basketball is probably played by more people around the world than tennis, it's much more accessible.
I don't think that detracts from Kobe and Lebron's stardom though.
Basketball is just a far more popular sport than tennis in so many countries and regions around the world, that I would always expect the top basketball players to be more well known than the top tennis players. Generally I would think that the NBA season season is more followed and tracked throughout the year than the ATP season, with so many casual fans not really caring about tennis events outside the slams, and considerably less diehard followers of tennis than basketball.
There are of course many fans who have a preference for other competitions over the NBA, with a lot of them viewing the NBA as a circus with too much selfish play and biased refereeing in favour of the big teams and star players. Still I think that anyone who follows basketball at any level whether it is US college set-up, the Israeli league etc, knows who Kobe and Lebron are. Similarly there are many football fans who prefer to follow other competitions to La Liga, but they would still all know who Messi and Ronaldo were.
The NBA season is so long with an 82 game regular season and best of 7 game playoff rounds, so even if basketball fans aren't hooked on every NBA game, there are still many opportunities to watch these players in action. The games are screened in so many countries. Plus they play a lot of exhos in other countries that are sold out almost instantly.
Kobe and Lebron both have a sizeable advantage over Federer in the lucrative American (as you would expect) and Chinese markets. In China basketball is also on a different level in popularity to tennis. Both those guys visit China regularly on tours and to play exos, and Kobe especially is treated like a hero there. Lebron, D-Wade and the Miami Heat have also made huge in-roads into the Chinese market and their popularity has soared. The NBA is just huge in China while tennis considerably less so; the Shanghai tournament gets such poor attendances, even for the Murray-Federer final in 2010.
Also in Africa the NBA and basketball are far more popular; for example it is the second biggest sport in the continent's most populous country Nigeria, and I would doubt that Federer is anywhere near as well known there as the biggest NBA superstars.
In Latin America NBA playoff games are shown in movie theatres in the world's 11th most populous country Mexico, while barely anyone cares about tennis there.
Of course Federer would have the advantage in Europe. Still with Basketball also being so popular in many countries in mainland Europe, the top NBA players would still be huge stars there. When the US team played an exho in Barcelona before the Olympics, they were treated like royalty, and Kobe and Lebron were mobbed everywhere they went in London despite basketball not being so popular in the UK.