font-family CSS property with IE6?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zenobia

    font-family CSS property with IE6?

    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.x psp1

    "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}

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

  • Neal

    #2
    Re: font-family CSS property with IE6?

    On Fri, 09 Jul 2004 16:07:07 +0100, Zenobia <6.20.zenobia@s pamgourmet.com>
    wrote:
    [color=blue]
    > 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.x psp1
    >
    > "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}
    >
    > +++ +++ +++ +++ +++
    >[/color]

    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.

    Comment

    • Els

      #3
      Re: font-family CSS property with IE6?

      Zenobia wrote:
      [color=blue]
      > 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.x psp1
      >
      > "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}
      >
      > +++ +++ +++ +++ +++[/color]

      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 vão. O resto é imperfeito.
      - Renato Russo -
      Now playing: Ofra Haza - Im Nin'alu

      Comment

      • Andreas Prilop

        #4
        Re: font-family CSS property with IE6?

        On Fri, 9 Jul 2004, Zenobia wrote:
        [color=blue]
        > 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;[/color]

        Shruti is a Gujarati font and does not contain ASCII glyphs.
        What are you going to achieve?
        [sans-]serif is meaningless to Indic typefaces.
        [color=blue]
        > FONT-SIZE: 13px;[/color]

        Don't do that!

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

        Comment

        • Neal

          #5
          Re: font-family CSS property with IE6?

          On Fri, 09 Jul 2004 11:19:56 -0400, Neal <neal413@yahoo. com> wrote:
          [color=blue]
          > Change width to ems too.[/color]

          I meant % - though ems should be OK as well.

          Comment

          • Andreas Prilop

            #6
            Re: font-family CSS property with IE6?

            On Fri, 9 Jul 2004, I wrote:
            [color=blue]
            > Shruti is a Gujarati font and does not contain ASCII glyphs.[/color]

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

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

            Comment

            • Andreas Prilop

              #7
              Re: font-family CSS property with IE6?

              On Fri, 9 Jul 2004, I wrote:
              [color=blue][color=green]
              >> Shruti is a Gujarati font and does not contain ASCII glyphs.[/color]
              >
              > <http://www.alanwood.ne t/unicode/fonts_windows.h tml>
              > claims that Mangal, Raavi, shruti contain ASCII glyphs -[/color]

              .... 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?


              Comment

              • Alan J. Flavell

                #8
                Re: font-family CSS property with IE6?


                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:
                [color=blue]
                > On Fri, 9 Jul 2004, Zenobia wrote:
                >[color=green]
                > > font-family: Shruti, "Trebuchet MS", Verdana, Arial,
                > > Helvetica, sans-serif;[/color]
                >
                > Shruti is a Gujarati font and does not contain ASCII glyphs.[/color]

                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?
                [color=blue]
                > What are you going to achieve?[/color]

                Presumably, it's meant to achieve what's described at


                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]
                [color=blue][color=green]
                > > FONT-SIZE: 13px;[/color]
                >
                > Don't do that![/color]

                Agreed! With knobs on!!

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

                Comment

                • Zenobia

                  #9
                  Re: font-family CSS property with IE6?

                  On 9 Jul 2004 15:20:00 GMT, Els <els.aNOSPAM@ti scali.nl> wrote:
                  [color=blue]
                  >Zenobia wrote:
                  >[color=green]
                  >> 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.x psp1
                  >>
                  >> "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}
                  >>
                  >> +++ +++ +++ +++ +++[/color]
                  >
                  >Do you have it uploaded somewhere?[/color]

                  I can't give a URL because this is still being written.
                  [color=blue]
                  >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.[/color]

                  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.

                  Comment

                  • Zenobia

                    #10
                    Re: font-family CSS property with IE6?

                    On Fri, 9 Jul 2004 17:24:42 +0200, Andreas Prilop
                    <nhtcapri@rrz n-user.uni-hannover.de> wrote:
                    [color=blue]
                    >On Fri, 9 Jul 2004, Zenobia wrote:
                    >[color=green]
                    >> 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;[/color]
                    >
                    >Shruti is a Gujarati font and does not contain ASCII glyphs.[/color]

                    Ha. That's a good clue. Silly MS Word displays Shruti as
                    sans-serif (Verdana). That go me confused.
                    [color=blue]
                    >What are you going to achieve?[/color]

                    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.
                    [color=blue]
                    >[sans-]serif is meaningless to Indic typefaces.
                    >[color=green]
                    >> FONT-SIZE: 13px;[/color]
                    >
                    >Don't do that![/color]

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

                    Comment

                    Working...