I'm trying to reproduce historical examples of typography and there's something I don't know how to obtain: poems are typed in italic, except the initial capital letters of each verse is upshape, and there is some italic correction between the initial letter of the first word of the verse, and the following letter. Besides, all capital letters inside verses are upshape too.
I feel like I should define a new font family, but trying to adapt some code found on this site results in an error (!Extra \endgroup). I'd be quite grateful to anyone who could explain how to do it.


\newfontfamilyis just for efficiency. Why not adding your attempt? – egreg Jun 12 '16 at 16:08255with4095, the code in the answer works. – egreg Jun 12 '16 at 16:21