By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,796 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,796 IT Pros & Developers. It's quick & easy.

font-family CSS property with IE6?

P: n/a
Is there a problem with the CSS font-family property with IE6 -
or is it my understanding of the font-family property?

I was under the impression that the browser tried to use the
first font. If it couldn't find that font it used the next on
the list and so on. If it couldn't find any on the list, prior
to the last it would use the last - which, as you can see is
sans-serif here.

When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.xpsp1

"Trebuchet MS" and Verdana are both displayed without a problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

..dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++

Jul 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Fri, 09 Jul 2004 16:07:07 +0100, Zenobia <6.**********@spamgourmet.com>
wrote:
Is there a problem with the CSS font-family property with IE6 -
or is it my understanding of the font-family property?

I was under the impression that the browser tried to use the
first font. If it couldn't find that font it used the next on
the list and so on. If it couldn't find any on the list, prior
to the last it would use the last - which, as you can see is
sans-serif here.

When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.xpsp1

"Trebuchet MS" and Verdana are both displayed without a problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++


1) Need more info than this, please post URL to an example of the problem.

2) My guess is that there's a font element overriding the CSS declaration.
Can't know for sure.

3) While we're on the subject of fonts, px or pt is a poor choice for
screen. % is best - 100% being the user's preferred reading size. Change
width to ems too. And span is inline, while p is block - you do know the
difference, right? BTW 0 distances don't use a measurement - so not 0px,
but just 0.

I recommend simplifying the test case, remove all styles but the
font-family, and see if the problem is replicated. If so, post URL to test
case.
Jul 20 '05 #2

P: n/a
Els
Zenobia wrote:
Is there a problem with the CSS font-family property with
IE6 - or is it my understanding of the font-family
property?

I was under the impression that the browser tried to use
the first font. If it couldn't find that font it used the
next on the list and so on. If it couldn't find any on the
list, prior to the last it would use the last - which, as
you can see is sans-serif here.

When I use the following style I get what I think is the
default system font - which is a SERIF font. Note that all
the fonts in the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family
property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.xpsp1

"Trebuchet MS" and Verdana are both displayed without a
problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++


Do you have it uploaded somewhere?
It could be an error in the stylesheet just before the a.m.
style, which would make this style not get read, or it could
be in your html somewhere.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
Now playing: Ofra Haza - Im Nin'alu
Jul 20 '05 #3

P: n/a
On Fri, 9 Jul 2004, Zenobia wrote:
When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.
What are you going to achieve?
[sans-]serif is meaningless to Indic typefaces.
FONT-SIZE: 13px;


Don't do that!

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #4

P: n/a
On Fri, 09 Jul 2004 11:19:56 -0400, Neal <ne*****@yahoo.com> wrote:
Change width to ems too.


I meant % - though ems should be OK as well.
Jul 20 '05 #5

P: n/a
On Fri, 9 Jul 2004, I wrote:
Shruti is a Gujarati font and does not contain ASCII glyphs.


<http://www.alanwood.net/unicode/fonts_windows.html>
claims that Mangal, Raavi, shruti contain ASCII glyphs -
but they don't.

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #6

P: n/a
On Fri, 9 Jul 2004, I wrote:
Shruti is a Gujarati font and does not contain ASCII glyphs.


<http://www.alanwood.net/unicode/fonts_windows.html>
claims that Mangal, Raavi, shruti contain ASCII glyphs -


.... or perhaps not. Alan Wood writes

| Basic Latin (numerals and punctuation)

Perhaps he means

| Not Basic Latin but only numerals and punctuation

--
Top-posting.
What's the most irritating thing on Usenet?
Jul 20 '05 #7

P: n/a

This is a CSS question - might I suggest in future to redirect
the thread at an earlier stage when this happens? ta.
x-posted and f'ups proposed...

On Fri, 9 Jul 2004, Andreas Prilop wrote:
On Fri, 9 Jul 2004, Zenobia wrote:
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.


I'd never heard of it before, but a google search led me to a
collection of (allegedly) free fonts at computingbydsn, and I've
just tried installing it to see. MS Font Property Extensions
says the only supported Unicode range(s) is Gujarati, but Listfont
appears to show lots of stuff including Latin-1, Greek, Cyrillic and
so on - is this some artefact of font handling or what?
What are you going to achieve?


Presumably, it's meant to achieve what's described at
http://www.w3.org/TR/REC-CSS2/fonts....nt-family-prop

To deal with the problem that a single font may not contain glyphs to
display all the characters in a document, [...]
this property allows authors to specify a
list of fonts, all of the same style and size, that are tried in
sequence to see if they contain a glyph for a certain character. This
list is called a font set.

So, according to the CSS specification, this is /supposed/ to take
from Shruti whatever characters it contains, and for characters which
it does not contain, to use one of the fonts named later in the list.

How well supported that is across the available browsers is a topic
that has been discussed, at least in general terms, on a number of
previous occasions, with somewhat mixed conclusions. Don't you think
it'll work - in general - or in this case specifically?

If the original poster would provide a demonstration URL, then we
might make some progress (hint).

Incidentally, if I ask IE to configure a default font for Gujarati,
the only options it offers me are Arial Unicode MS, Code2000 (which I
installed for purely experimental reasons) and (now) Shruti. (Oh, and
for a monospaced font I get no choices whatever).

Of course the usual caveats about Verdana have to be repeated.[1]
FONT-SIZE: 13px;


Don't do that!


Agreed! With knobs on!!

[1] See e.g http://www.xs4all.nl/~sbpoley/webmatters/verdana.html

Jul 20 '05 #8

P: n/a
On 9 Jul 2004 15:20:00 GMT, Els <el*********@tiscali.nl> wrote:
Zenobia wrote:
Is there a problem with the CSS font-family property with
IE6 - or is it my understanding of the font-family
property?

I was under the impression that the browser tried to use
the first font. If it couldn't find that font it used the
next on the list and so on. If it couldn't find any on the
list, prior to the last it would use the last - which, as
you can see is sans-serif here.

When I use the following style I get what I think is the
default system font - which is a SERIF font. Note that all
the fonts in the list below are SANS-SERIF.

Is this an IE bug or am I mis-using the font-family
property?

I running XP pro SP2 with this version of IE: IE
6.0.2800.1106.xpsp1

"Trebuchet MS" and Verdana are both displayed without a
problem.

+++ +++ +++ +++ +++
Here is my class definition. It's applied to <span> and <p>
+++ +++ +++ +++ +++

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
FONT-SIZE: 13px;
font-weight: bold;
color: #603eA2;
cursor: default;
background-image: url(http://eg/images/grid.gif);
width:120px;
margin-top: 0px;
margin-bottom: 0px}

+++ +++ +++ +++ +++
Do you have it uploaded somewhere?


I can't give a URL because this is still being written.
It could be an error in the stylesheet just before the a.m.
style, which would make this style not get read, or it could
be in your html somewhere.


If I make one modification on this line, from:

font-family: Shruti, "Trebuchet MS", Verdana, Arial, Helvetica,
sans-serif;

to:

font-family: "Trebuchet MS", Verdana, Arial, Helvetica,
sans-serif;

then it's OK. I checked and my machine doesn't not have the
Shruti font installed.

I will look into Neal's suggestions.

Jul 20 '05 #9

P: n/a
On Fri, 9 Jul 2004 17:24:42 +0200, Andreas Prilop
<nh******@rrzn-user.uni-hannover.de> wrote:
On Fri, 9 Jul 2004, Zenobia wrote:
When I use the following style I get what I think is the default
system font - which is a SERIF font. Note that all the fonts in
the list below are SANS-SERIF.

.dateSpan {
font-family: Shruti, "Trebuchet MS", Verdana, Arial,
Helvetica, sans-serif;
Shruti is a Gujarati font and does not contain ASCII glyphs.


Ha. That's a good clue. Silly MS Word displays Shruti as
sans-serif (Verdana). That go me confused.
What are you going to achieve?
I was looking for the most attractive sans-serif font. I can't
find one with all the attibutes I like such as nice oval 0, a l
with a hint of a loop at the bottom, a g with a simple
descender, etc.
[sans-]serif is meaningless to Indic typefaces.
FONT-SIZE: 13px;


Don't do that!


OK. Thanks, people for your help. I'm clearly making lots of
mistakes with my CSS. I'll sort it out.

Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.