Click to See Complete Forum and Search --> : Backup Fonts


C1RCU175P1D3R
08-22-2005, 10:32 PM
Hey Guys, I'm working on a page for a friend, and one of the fonts I've used doesn't work on all computers. I remember reading a code once that lets you put in an alternate font face for users who don't have that font, but I don't remember what it was, or where I read it, if anyone could help, I'd be much obliged.

-Thanks

scojo1
08-22-2005, 10:38 PM
you can do this with CSS and the font-family property, if you need help with the CSS let me know

check this out
http://www.htmlhelp.com/reference/css/font/font-family.html

C1RCU175P1D3R
08-22-2005, 10:47 PM
Heh... yeah, I'm not all to advanced, I just remember that there was a code for a secondary font, but I can't remember it. Can't do anything CSS, and I have no clue what the web-design group means on anything! hahaha! :D

NogDog
08-22-2005, 10:51 PM
Specifically, these are the generic font families:
'serif' (e.g. Times)
'sans-serif' (e.g. Helvetica)
'cursive' (e.g. Zapf-Chancery)
'fantasy' (e.g. Western)
'monospace' (e.g. Courier)
When assigning a font-family via CSS, you can provide a list of fonts with the most preferred being first in the list, and you should always provide one of the above generic fonts at the end of the list.

Style sheet:

body {
font: medium arial, helvetica, sans-serif;
}
h1 {
font-family: courier, monospace;
}

You can assign it in-line using the style attribute:

<p>This is a test. <span style="font-family: 'comic sans-serif', fantasy">It is
only a test.</span></p>

Charles
08-23-2005, 05:21 AM
That should be:body {
font: 'Medium Arial', Helvetica, sans-serif;
}
h1 {
font-family: Courier, monospace;
}

NogDog
08-23-2005, 09:06 AM
That should be:body {
font: 'Medium Arial', Helvetica, sans-serif;
}
h1 {
font-family: Courier, monospace;
}
Negative: "medium" is the font size, followed by a list of font names. (I wanted to show how a list of font-family names could be used in with the "font" descriptor as well as the "font-family" one.)