The best direct numbers I've found ranged from half an acre per person on an all-vegetarian diet to 2 acres a person if the selection focuses more on meats. Some of the answer would depend on what level of tech you want; if you were willing to place the advancement of the society at around the second agricultural revolution, you would be able to have a much better farm:city ratio than a society that is in the middle of the dark ages.
The most land-efficient crops are grains like potatoes, wheat, and of course rice (which might not fit in a european-like fantasy culture); but none of these provide all of the needed nutrients. For protein, you could add soy (also problematic) or beans to the mix, but this still might not account for all the parts of a healthy diet if the culture didn't have a good enough working knowledge of nutritional science. You could also have land allocated to support animals, but this is much, much less efficient than growing crops directly. One solution I found was to raise cattle, not for their meat (which is much less efficient than other foods), but for the dairy products they produce. Milk and cheese are high in a wide range of nutrients and could be used to supplement a plant-based diet to improve health. You could expand this further by raising goats or yaks, which make wool as well.
This combination increases the land needed to support the population to a little under 0.6 acres per person, but actually ends up being more efficient than pure vegetarianism, as pasture land is easier to take care of and thus needs less humans to support it. Another important note is to remember to rotate whatever crops you do choose, to avoid overtaxing the soil. Crop cycling didn't develop until after the medieval period, however, and it might be more interesting, setting-wise, to avoid it and instead have the city farm patches of land dry and then leave them alone for a few years to regrow and replenish before farming them again.
As for underground farming, there are some species of edible fungus that would work, but remember that they have to get the energy to grow from somewhere. This means that the farms would have to be close enough to the surface to let the mycelium spread to the ground above. This would make large-scale mushroom farms hard to manage, as the fungus would naturally try to grow fruiting bodies above the surface and any "plots" would have to be supported from below to keep from caving in. Overall, the effort would make this less viable than other methods, but if space was limited enough might be necessary and would certainly add a cool detail to the background. Alternatively, you could have the people harvest the roots of plants growing aboveground, but that would make them difficult to plant and cultivate without going outside the city or digging up to the surface.