You don't substitute - you calculate, just like a printsetter. The font gets scaled with the document in an abstract way, as in a PDF.
Of course, HMTL/CSS is not a page-definition langauge, so there are issues, but it's a hell of an improvement over fixed point sizes.