Is it possible to snap/align to the pixel grid the top edge of a small letter?

the baseline of the text will always snap to the pixel grid, but there are situations when i need to snap the top edge of a small letter to the pixel grid or edge of a shape layer. can this be done?

any ideas, please?