The way that medieval coinage would generally work is that a decision would be made about how many coins would be struck from a given weight of metal, which would therefore indicate the value of the individual coin.
So to take the pound as an example, starting with King Offa of Mercia, the Anglo-Saxons established that 240 silver pennies would be struck from one pound weight of silver, and further than one penny was worth four farthings and twelve pennies were worth 1 shilling (which meant that twenty shillings were worth one pound). Offa in turn was borrowing from Charlemagne, who established that one pound of silver was equal to one livre, which was worth 20 sous/sols, which in turn were worth twelve deniers. Keen eyed observers will note that the notations for the different currencies – l, d, s – are the same in the British and Frankish systems. The reason for that is that Charlesmagne and his copiers in England, Italy, Spain, etc. were in turn copying Roman currencies: the “l” stands for “libra,” the “d” for “denarius,” and the “s” for “solidus.”
In other words, tradition and culture matters. Rome was associated with a commercial, currency-based economy and even after the fall of the Roman Empire, the memory of that economy was still strong, so associating your coins with theirs went part of the way towards ensuring that people thought your currency was good.
So for gold coins, you’d figure out how many coins would be struck from how much gold. Again, to take the English example, the “noble” was the first English gold coin to circulate widely. Originally, the noble was 138.5 grains or 9 grams of gold, so that one pound of gold would produce 453 or so nobles.
However, one thing to keep in mind is that, with a metallic standard, the government has to be careful that the cost of the coin doesn’t exceed its value (which means you’re actually losing money by making it), and there’s always an incentive to exercise the right of seignorage by declaring the face value of the coin to be greater than the actual metallic content of the coin (which means you’re making money by making money). Combined with the constant problem of private individuals producing counterfeit coins by clipping, sweating, or plating, the actual weight and purity of the currency in circulation tends to change over time.