I seriously doubt you need 2x12 rafters, how far horizontally from barn wall to posts? 30lb/ft snow load?
Posts no more than 8' apart, this lets you "weave" 16' 2x12's for the header beam, helps tie that beam together. I'd add another post and refigure spacings if you can.
Footing dimension depends on the answers to the above and the soil bearing capacity, unless it is junk or soft clay it is usually assumed to be 2000lbs /sf capacity. So a 12"x12" footing can safely hold a ton without sinking (not much!) where a 2'x2' footing can hold 8000lbs, now we're getting somewhere. It needs to be thick enough that as it gets wider the post cannot "punch through". At 2'x2' I pour 1' thick and put 4 pcs of 18" long rebar 3" off the bottom in a # pattern. If the concrete is in the ground always have at least 3" of concrete around the steel, keep the oxygen out and it won't rust away anytime soon. Attach the post to the footing so when the tractor bumps the post it doesn't slip and when the wind gets under the shed it cannot lift it. Hurricane ties from rafter to beam, beam well attached to posts. Backfill with whatever, the barn provides lateral stability through the shed roof diaphragm, it's a rigid plate extending out from a braced building, the post footings are providing resistance to up and down only.