+ Reply to Thread
Results 1 to 10 of 10

Thread: Custom Fonts in Internet Explorer

  1. #1
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Custom Fonts in Internet Explorer

    Hey guys I'm working on a site for a friend of mine and he has a brand set up for his company. This brand has its own font and I'm trying to get it to work on the website. I got it to work with every browser except for internet explorer. I searched with google and couldn't get anything that worked.
    Here is my CSS code:
    Code:
    @font-face {
        src: url(../fonts/font1.eot);
        font-family: font1;
        src: local("font1"), url( ../fonts/font1.ttf ) format("truetype");
    }
    I ran it through a validation service and it said it was all screwed up. Can anyone give me a definitive answer on how to get the custom fonts to work? I have both .ttf files and .eot files.

    Thanks again!

  2. #2
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Custom Fonts in Internet Explorer

    first, your code there is valid CSS3.

    second, what version of IE are you using? as far as i'm aware, older versions of IE do not support custom fonts at all. (although i'm not sure on that).

    edit:
    woot! 500th post!
    Last edited by kbjradmin; 03-25-2010 at 11:42 PM.

  3. #3
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: Custom Fonts in Internet Explorer

    I thought IE was supporting custom fonts since 5.5. I am trying to get it to work with IE7 and 8. It works with everything else...

  4. #4
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Custom Fonts in Internet Explorer

    i've done some looking around, and from what i can tell, the best way to do it is to use conditional comments to do the IE part. eg.

    HTML Code:
    <!--[if IE]>
    <style type="text/css" media="all">
    @font-face {
      font-family: Bleeding Cowboys;
      font-style:  normal;
      font-weight: normal;
      src: url('BLEEDIN0.eot') !important;
    }
    </style>
    <![endif]-->
    <style type="text/css" media="all">
    @font-face {
      font-family: Bleeding Cowboys;
      font-style:  normal;
      font-weight: normal;
      src: url('Bleeding_Cowboys.ttf');
    }
    </style>
    taken from: http://nickcowie.com/2008/font-face/
    Last edited by kbjradmin; 03-26-2010 at 02:17 AM.

  5. #5
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: Custom Fonts in Internet Explorer

    That's not working for me either maybe its because I am trying to use it in my style sheet. If I have to I can try putting in my html documents but I don't really want all that extra code running around...

  6. #6
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Custom Fonts in Internet Explorer

    I read an article on FF's blog about it... but I can't remember when and where. M$ why did you have to make those things some complicated?
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  7. #7
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Custom Fonts in Internet Explorer

    if you want to cut back on the code in your html document, you could put a lot of that in an external file like this

    index.html
    HTML Code:
    <!--[if IE]>
      <link rel="stylesheet" href="ie-only.css" />
    <![endif]-->
    <link rel="stylesheet" href="main.css" />
    ie-only.css
    Code:
    @font-face {
      font-family: Bleeding Cowboys;
      font-style:  normal;
      font-weight: normal;
      src: url('BLEEDIN0.eot') !important;
    }
    main.css
    Code:
    @font-face {
      font-family: Bleeding Cowboys;
      font-style:  normal;
      font-weight: normal;
      src: url('Bleeding_Cowboys.ttf');
    }

  8. #8
    farscapeone's Avatar
    farscapeone is offline Community Advocate farscapeone is on a distinguished road
    Join Date
    Dec 2008
    Location
    Србија (Serbia)
    Posts
    1,166

    Re: Custom Fonts in Internet Explorer

    Last edited by farscapeone; 03-28-2010 at 09:06 PM.

  9. #9
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: Custom Fonts in Internet Explorer

    Quote Originally Posted by leviathon View Post
    sweet leviathon it worked! finally jeeeeez I'm going to book mark the bajeezus out of that page.
    Last edited by garrensilverwing; 03-28-2010 at 10:50 PM.

  10. #10
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: Custom Fonts in Internet Explorer

    awesome @leviathon, i will have to bookmark that (:

+ Reply to Thread

Similar Threads

  1. Internet Explorer
    By jtwhite in forum Graphics & Webdesign
    Replies: 16
    Last Post: 09-02-2009, 04:53 PM
  2. internet explorer 8
    By pbmuja in forum Computers & Technology
    Replies: 21
    Last Post: 08-14-2009, 10:03 AM
  3. Internet Explorer 8
    By papichulo_carioco in forum General
    Replies: 9
    Last Post: 04-18-2009, 09:31 PM
  4. Photoshop Brushes/CUstom SHapes/Fonts
    By SEÑOR in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 11-05-2006, 06:36 PM
  5. A New Internet Explorer!!!
    By cloud2se in forum Crossfire
    Replies: 1
    Last Post: 10-20-2006, 02:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers