Results 1 to 8 of 8

Thread: Different CSS for different fonts?

  1. #1
    Join Date
    Oct 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Different CSS for different fonts?

    Hi -

    I have been searching for the answer to this question and haven't come across a suitable solution....

    I would like to use the new Microsoft font Calibri (which comes standard with Office 2007 and Windows Vista). However if people haven't upgraded I would like them to see Trebuchet.

    The issue is that these two fonts display as quite different sizes. What looks like a 10 point font in one is a 13 point in the other. This makes the difference between the content being readable and indiscernable.

    Is there any way that I can use CSS to specify that if the reader is seeing Calibri it shows as one font size and if Trebuchet it shows as another font size?

    Thanks a million!!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It sounds as if Calibri is another of those fonts (like Verdana) that should be avoided entirely for web development because it is proportionally bigger than other fonts.

    Using point sizes for onscreen fonts is a bad idea anyway, however. Points are a real-world measurement, and the actual size relative to the display will vary.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't think this is going to be possible purely in CSS, using php this is quite easy as you would just have to detect whether Calibri is installed.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    ... which is impossible.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Oct 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Not the answer I hoped for... but thanks for the help!

  6. #6
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Erm...
    Code:
    font-face: "Calibri","Trebuchet MS";
    Last edited by techno_race; 07-07-2007 at 05:02 PM. Reason: hey! 200th post!
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  7. #7
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Oh, sorry, I didn't read your whole post. That is impossible.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    And all fonts specified with font-family should have a generic font... er... family... as a last resort.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •