Jason Segel attends the premiere of "The Five Year Engagement during the 2012 Tribeca Film Festival at the Ziegfeld Theatre on April 18, 2012. Credit: Dimitrios Kambouris/WireImage.com

Not just anyone can play Emily Blunt's husband!

Jason Segel revealed Monday night on Late Show with David Letterman that he was "forced to lose weight" for The Five-Year Engagement.

Who forced him?

"The studio president," Segel told David Letterman referring to Rob Meyer, the president of Universal Pictures. "I was told that it had to be conceivable that Emily Blunt would ever choose me to be her husband. Which is fair."

Segel, 32, is the writer of the film and specifically wrote the role of his wife for Blunt, 29. And even though he's good friends with the actress and her husband, John Krasinski, he didn't mind shooting the love scenes!

The How I Met Your Mother star joked, "I wrote all these love scenes with Emily Blunt and she shows up and she just has to do it because we're paying her money and it's her job."

But Segel is now a taken man in real life.

Last month, Us Weekly first broke the news that Segel is now dating longtime pale Michelle Williams, 31. The actor broke his silence on his romance with the oscar-nominated actress, 31, last week -- telling Extra, "I think we would just very much like to be happy. That's all I'm going to say about it."

A source tells Us, "Jason has been trying to be more of a grown-up lately. He is taking care of himself more, exercising, eating right and dressing better. Basically, not acting like a frat boy anymore."