Related, I came across this explanation of how the dollar sign ended up as an S with a line: http://observationdeck.io9.com/why-is-the-dollar-sign-a-letter-s-1683940575
The short version is that dollar comes from an older word (lots of spellings throughout Europe) that was sort of the universal currency for Europe at one point. Then the Spanish made the pieces of 8, or pesos, and THAT became the universal currency. And the peso symbol (P and S superimposed) and the word dollar got rather mixed up together, and over time the peso symbol got simplified by dropping the bowl of the P. So the $ is actually a simplified peso symbol. I have no idea how the second vertical line showed up in some fonts though.