CSS Question: What to do with fonts if the user end doesnt have it on their computer?
Asked by
bumpley (
10)
November 1st, 2008
i was a as2/as3 developer before i ever got into DHTML. If the users don’t have the fonts we’re using in our dynamic field, we would just embed and attach the font file into the library. Is there anything like this within CSS? I mean, can we just store the font in a folder and just use: ” font-family: library/fonts/bookman.ttf”
?
Observing members:
0
Composing members:
0
4 Answers
Currently this is basically only available in Webkit-based browsers such as Safari and Chrome.
This is a touchy subject with a lot of designers. Your best bet is sIFR which uses Flash and JavaScript to replace text with a custom font. It’s a horrible pain in the rear but unfortunately it’s the best option.
I’ve also heard some decent things about FLIR but I can’t vouch for it.
If you don’t feel like doing those, just specify back up fonts. Like so:
font-family: Helvetica, Arial, sans-serif;
sIFR is the way to go here!
The two best options are a CSS replace with an image or just dont do it to start with.
Unfortunately as far as the web goes, you cant hope someone has the font nor can you provide it.
The only other idea would be to use backup fonts, like this:
font-family: “your font name here”, Arial;
which would mean, if the user doesnt have your font, it will default back to Arial, you can do this as many times as you want with any font you want.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.