You're correct that the 12" rough-in refers to the distance from the wall to the center of the bolts. The 12 1/2" dimension that you have is fine for a 12" toilet.

The 30 3/8" dimension refers to the farthest edge of the toilet's rim from the wall. Unless your bathroom is small, don't be too concerned about this measurement. Just make sure that there is room for the bathroom door or shower door to clear the toilet as it is opened.