What is called a person who makes fun of others for a characteristic while himself or herself has it.
For example a short person who scorn someone for being short.
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
hypocrite noun uk us /ˈhɪp.ə.krɪt/ disapproving
someone who says they have particular moral beliefs but behaves in way that shows these are not sincere:
He's a hypocrite - he's always lecturing other people on the environment but he drives around in a huge car.
Derivations from [Pot calling the kettle black] and [Psychological projection] are truly relevant, 'hypocrite' not so much. The person mocking others for traits he has himself is unaware, self-unaware. The double standard of the hypocrite implies conscious purpose. The simple mockerer (is that a word?) is kind of innocent due to unawareness, a hypocrite is not an innocent.
This sounds like psychological projection.
Here's a single-word dictionary definition:
Projection 6b : the attribution of one's own ideas, feelings, or attitudes to other people or to objects - M-W
And here's a description in more depth:
Psychological projection, also known as blame shifting, is a theory in psychology in which humans defend themselves against their own unpleasant impulses by denying their existence while attributing them to others. For example, a person who is rude may constantly accuse other people of being rude. - wikipedia