Reputation: 1
I would like to create an email signature that requires a certain font to be present. I know that a large percentage of my email recipients have the proper font but for those that do not I do not want certain text displayed.
How do I do this conditional CSS based on available fonts?
Thanks.
Upvotes: 0
Views: 94
Reputation: 4247
i agree with matthewpavkov , an image is the way to go. you could try using @font-face, but i don't know if it's really worth the hassle for a signature.
Upvotes: 0
Reputation: 7183
the only way possible i've seen requires javascript but since javascript isn't available to you in email you are limited to presentation-only rules which can't be parsed for client-side info.
Upvotes: 0
Reputation: 2928
This isn't possible though CSS alone. And since you can't use javascript (this is in an email), you're more or less out of choices. Why not use an image of the text you want to display? A nice png would do the trick, and no one would know the difference. Of course, you won't be able to select the text this way.
Upvotes: 0
Reputation: 449605
The short answer is you can't.
Finding out the actual used font from a list of font-family
values is hellishly difficult bordering the impossible even using JavaScript. It's impossible in CSS.
The only way to do this is probably by rendering the text as an image.
Upvotes: 3