www.webdeveloper.com
Results 1 to 7 of 7

Thread: @font-face not working

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    32

    Unhappy @font-face not working

    Hello
    I've read countless posts about this but none of which seem to be solving my problem. I simply cannot get my headline tags to render in my non-web-standard font.

    I have the font file at the same level as my stylesheet. The stylesheet contains these rules:

    Code:
    @font-face {
      font-family: 'Glypha65Bold';
      src: url('Glypha-Bold.eot?') format('eot'), url('Glypha-Bold.woff') format('woff'), url('Glypha-Bold.ttf') format('truetype'), url('Glypha-Bold.otf') format('otf');
    }
    
    h3 {font-family:'Glypha65Bold' , Arial;}
    There are no other rules overwriting this.
    When I navigate to the font file in the browser address bar using the expected path I am prompted to download the font (i.e. the font is in the correct location).
    I've ensured that capitalisation has been adhered to as my sites is on a Windows server.
    I am experiencing this issue in all major browsers (IE8 FF9 Chrome Safari).

    Can anyone see what might be causing the problem?

    Thanks

  2. #2
    Join Date
    Mar 2011
    Posts
    1,138
    It's still most likely a path issue. Relative addresses in CSS are based from the stylesheet. If the CSS is embedded in a webpage, the path is calculated from the directory where the webpage resides. If it's an external stylesheet, the path is calculated from the directory where the stylesheet file resides. The acid test is to use complete URLs in your stylesheet. If that fixes it, you've found the problem. Good luck!
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,704
    ...I'm not entirely sure if @font-face is supported.

  4. #4
    Join Date
    Aug 2010
    Location
    San Diego
    Posts
    242
    Quote Originally Posted by Mr Initial Man View Post
    ...I'm not entirely sure if @font-face is supported.
    http://caniuse.com/#feat=fontface

  5. #5
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,704
    You learn something new every day. :-)

  6. #6
    Join Date
    Feb 2009
    Posts
    32
    I'm still having difficulty with this - I've tried multiple fonts and tested everything on my live server and still the font refuses to appear. Firebug shows that it is being called however...

  7. #7
    Join Date
    Aug 2010
    Location
    San Diego
    Posts
    242
    Quote Originally Posted by andidas311 View Post
    I'm still having difficulty with this - I've tried multiple fonts and tested everything on my live server and still the font refuses to appear. Firebug shows that it is being called however...
    If you post a link to your site maybe we can help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles