To me, 1. is synonymous with in reality, or the truth is, whereas 2. functions like, but is not synonymous with, specifically and moreover.1. They think she is John's girlfriend. In fact she is his cousin.
2. Vegetables should play an important role in our diet. In fact, they provide vitamins such as . . . ;