though foundation cells are the same in their dimensions, they generally don't maintain their consistency when drawn out. Some become larger then others. The queen will inspect each cell prior to laying an egg. She determines, based on the interior dimensions of the cell, whether to lay a fertilized (worker) or unfertilized (drone) egg.
there are exceptions of course. Queens that didn't mate well enough may start to lay more and more drone eggs regardless of the dimensions. And then there is the case of laying workers.
But for the most part the drawn comb size determines the type of egg laid. Position on the frame may have an impact as well. Most of the cells in the middle are the smallest when drawn out. The drone frames usually end up on the bottom of the frames to the outside.