Calculating perfect font highlights

Ingredients: 2x Space width, 2x descender height, 1x caps height, one extra pixel.
Bon appétit!