General Question

bumpley's avatar

CSS Question: What to do with fonts if the user end doesnt have it on their computer?

Asked by bumpley (10points) 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

irondavy's avatar

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;

wilhel1812's avatar

sIFR is the way to go here!

philo23's avatar

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.

lapilofu's avatar

Here’s a good and recent article on the current state of web fonts and what to do about it.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther