Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

font-family

Recommended Posts

I was wondering about font's.  I have been using the same 4, but aren't font's specifically set up under families.

serif", "sans-serif", "cursive", "fantasy", "monospace" Those are the families right, then any sub-font's are fonts within that font family. Are there any font families other than those.
See I am trying to get a general idea on what all options are actuallya vailable with css font-family.  Does anyone know of a huge list of all the font families, what fonts are in those font families, atleast all the one's that are used in the browser's by default.  I am trying to get an idea of what all can be safely used, and what can be partially used, but you should have a backup for.

Share this post


Link to post
Share on other sites
Font-family is [b]not[/b] a pre-defined thing. It is a way for you to define a family of fonts to use on a specified tag/grouping in CSS. With CSS, I'm fairly safe saying you're at complete liberty to come up with almost anything you can imagine, and if you syntax is correct, the browsers will render it. What happens with font-family is that the first one listed is the "default" that the browser will attempt to render with. If that font is not present on the computer, it falls back to the second, the third, and so on. Therefore, it is a good idea to round out the list with a "family" such as serif, sans-serif or mono. I could, however, mix them up and actually do something like this:
[code]
font-family: Verdana, "Times New Roman", "Trebuchet MS", Georgia, Arial, sans-serif;
[/code]

Notice there are serif and sans-serif fonts present in my listing, but I eventually default back to sans-serif.

For any other specific questions you have on how to view fonts, check out the [url=http://www.w3.org/TR/REC-CSS2/fonts.html]W3C font reference[/url]. It lists the only general font families to be serif, sans-serif, cursive, fantasy and monospace.

Share this post


Link to post
Share on other sites
My Linux has Times New Roman as a mono-spaced font. Kind of annoying...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.