The text is a proverbial expression that conveys the idea that someone who is arrogant or overconfident when things are going well may become discouraged or reduced in confidence when facing difficulties. It does not play on different meanings of a word or similar-sounding words for a humorous effect.
He that swells in prosperity will shrink in adversity .