Believe me, when you are ugly, people will tell you directly
Well, either directly or indirectly. Depends on how confrontational the person/people are. I can recall only one time sby i knew said i was ugly & also said to wear a paper bag over my head & to make ghost noises (which i did right away, to call their bluff). Another time the person said (after not seeing for a year/so) 'still as ugly as ever'. I can recall one time where sby said loudly 'god he's ugly' (direct comment, but said indirectly). The rest of the times, were indirect stuff, like being laughed at by groups, being called names, belittling, bullying, etc.
But there will also be times, for some people, where it's said, but means the exact opposite (ie sarcasm). I've even done it myself. When i reached the teen girl cashier at a supermarket, i blurted out 'woah! ugly!', then apologised saying 'just kidding' (she was very pretty; perhaps i was trying to flirt, i think). Another time i said to an attractive teen girl at my workplace sth like 'you look like more of a man than i do!' (it was meant to be a compliment, but she walked off the job right then & there!).