Reputation: 841
Can you assign a font-size
for alternative fonts?
I use font-family: font1, font2, font3;
but in my current project I am having a hard time finding proper fall back fonts that are at least close to the same size as the original.
Is there someway I can assign a font size per font that is chosen, based on what the user can render?
I am not looking for a lesson in using web safe fonts or trying to start a debate about such.
Upvotes: 1
Views: 136
Reputation: 8966
Have you looked at the font-size-adjust
property?
http://www.w3.org/TR/css3-fonts/#font-size-adjust-prop
Upvotes: 1
Reputation:
I really, really wish there were, and I sincerely hope that someone has some ingenious way to do this and my answer is down-voted because of that ingenious answer, but no... there isn't, at least not with pure CSS.
What you could do, and there are probably libraries to do this, is use JavaScript to detect font-support and then set the font-size based on that detection.
similar question: Changing Body Font-Size based on Font-Family with jQuery
Upvotes: 3