How the hell is this not already a CSS feature?
font-size: "as-big-as-possible-while-still-fitting-parent-container";
or maybe just font-size: max;