Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

After exploring typography more I've learnt the different between a typeface and a font :)

I'd like to know how I can call the fonts 'Arial Black' or 'Arial Narrow' within CSS? The font-family setting doesn't do it. Is this what the font-weight setting is for?

share|improve this question
    
firefusion work on your accept rate, 14% is quite low. I think this question if more appropriate for stackoverflow.com, there are quite a few like this... –  Yisela Dec 2 '11 at 15:20
add comment

3 Answers

The font-family property specifies the font for an element. It also requires the font to be installed on the end users operating system. This is why font stacks are used with multiple fallbacks all the way down to serif and sans-serif. font-style specifies the style of the font such as italic or oblique. font-weight specifies the weight bold, normal, lighter, heavier or it can be expressed in numeric value.

body {
font-family: helvetica, arial, sans-serif;
font-weight: bold;
font-style: italic;
}
share|improve this answer
add comment

You can put "Arial Black" or "Arial Narrow" in your font stack (put them in front if you want them to be the default), but if the user doesn't have them installed their browser will substitute the first font they have installed.

You can force the font on users using @font-face,but that takes some configuring. A good place to read up on how to that is http://www.fontsquirrel.com.

share|improve this answer
add comment

At least as far as CSS is concerned, these are different font families.

Note that if the font name includes spaces, you need to wrap it in quotes:

font-family: Arial;
font-family: "Arial Black";
font-family: "Arial Narrow";

You can choose the bold or italic fonts in a family like this:

font-family: Arial;
font-weight: bold;
font-style: italic;

If a family doesn't contain bold/italic/bold-italic fonts, they'll be simulated by distorting the base font. This should be avoided, as it doesn't usually look good.

share|improve this answer
    
Yep. Sadly, the W3C wasn't flush with typography folks when these things were built into CSS, so it is an awkward situation. –  DA01 Nov 23 '11 at 19:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.