Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Narrow bold 2

Status
Not open for further replies.

spicymango

Programmer
May 25, 2008
119
CA
Hi,

Is there anything called 'Narrow bold' for Arial. I have seen 'bold' but never 'Narrow bold'
 
I see that you have asked 20 questions and only had 2 answers that you found to be valuable. It may help if you read faq222-2244

For this one, Google shows lots of 'Arial Narrow Bold' but very few will be on most client browser machines. However many clients will have a version of Arial Narrow so you can try that in conjunction with the CSS font-weight property to get close. See
Make sure you set alternatives to any non-standard fonts you use so you still have some control over the layout

If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
thanks johnwm,

I found all the reponses very valuable, including your last response. How you determined i found only 2 response valuable?

1 question I have when we something like
font-family: courier, serif

does that mean both courier, serif font will appy
or it means
serif will apply only if courier is not available
 
The second one. The font-family works in a way that the fonts are picked up one by one until there is one that is found installed on the client machine. The last font should be one of the generic types, meaning that it is not a name of the font, but a type of font. The client machine then chooses the correct font for the type.

Your example is strange though, as courier is a monospace font and serif is not a monospace type. Generic type to follow courier should be monospace.

And johnwm figured you found two responses valuable based on the stars you've awarded. As you can see, stars are given as a thanks for a valuable post.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
That thing is quite confusing. I never knew there is a font and a type

so in the following

font-family: "Avant Garde",
"Century Gothic",
sans-serif;


first it will look for "Avant Garde" on the machine if can not find it then look for "Century Gothic", right?

and they both belong to type sans-serif, which is a type, correct

In case if it could not even find "Century Gothic", then it will look for whatever font it finds for sans-serif correct?

 
Well, you're almost there.

The font-family rule allows you to specify the font you want to use in a particular element (technically, they're actually typefaces rather than fonts, but let's not be too pedantic). If you specify more than one font, the browser will use the first one (starting from the leftmost) that the user has installed.

But what if the user doesn't have any of them installed? That's where generic fonts come in. These five keywords broadly define a type of font:

serif - A font with serifs (the little sticky out bits on the ends of lines), e.g. Times New Roman
sans-serif - A font without serifs, e.g. Arial
monospace - A font where all characters are the same width, commonly used to display computer code, e.g. Courier
cursive - A font which looks like handwriting, e.g. Comic Sans
fantasy - A fancy or decorative font used in titles, e.g. Algerian

When you specify one of these, you're asking the browser to use whichever font of that type is available to it. So if I say
Code:
.foo { font-family: Helvetica, "Gill Sans MS", sans-serif; }
I'm saying "elements of class foo should be rendered in Helvetica if you have it, failing that use Gill Sans MS, and if you don't have either of them use whatever sans-serif font you do have". Normally, you'll use the generic font that most matches the specific font(s) that you asked for, but you don't have to do so. This is perfectly valid code:
Code:
.bar { font-family: Helvetica, "Gill Sans MS", serif; }
As you can never be 100% sure what fonts all your user will have, you should always specify a generic font at the end of each font-family rule.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top