Richard Simmons just got a financial injury added to the insult of losing his defamation lawsuit against the National Enquirer.

According to court docs, Simmons has been ordered to cover attorney costs and any other court fees incurred by the Enquirer. You'll recall, Richard sued the tabloid for defaming him with a story saying he was in the process of sexual reassignment.

He lost the case with the judge saying being misidentified as transgender doesn't expose someone to "hatred, contempt or ridicule."

The exact amount of attorney's fees hasn't been determined yet. We broke the story ... Richard plans to appeal, so if he wins he'll most likely be off the hook for the Enquirer's lawyers.