Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Mar 2011
    Posts
    212
    Thanks
    10
    Thanked 1 Time in 1 Post

    Custom Font not working on site

    trendstudiosorlando.com/test2/index.html

    The font is supposed to be bank gothic through out, but it defaults. My css for the font is the same as another website i made which works fine.

    Code:
    @font-face{
      font-family: 'BankGothicMdBTMedium';
        src: url('bankgthd-webfont.eot');
        src: url('bankgthd-webfont.eot?#iefix') format('embedded-opentype');
             url('bankgthd-webfont.woff') format('woff');
             url('bankgthd-webfont.ttf') format('truetype');
             url('bankgthd-webfont.svg#BankGothicMdBTMedium') format('svg');
        font-weight: normal;
        font-style: normal;
    }

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Look if the file path is correct. Currently it assumes the fnt files in the same directory as the CSS where it’s specified.

    Edit: Ah, no, I see what’s wrong. You have semicolons where you should have commas, in the second src value.
    Last edited by VIPStephan; 06-08-2012 at 05:45 PM.

  • #3
    Regular Coder
    Join Date
    Mar 2011
    Posts
    212
    Thanks
    10
    Thanked 1 Time in 1 Post
    I checked and put it in the stylesheets folder, but nothing has changed

  • #4
    Regular Coder
    Join Date
    Mar 2011
    Posts
    212
    Thanks
    10
    Thanked 1 Time in 1 Post
    I may be blind at this point lol but I dont see what you mean?

  • #5
    Regular Coder
    Join Date
    Mar 2011
    Posts
    212
    Thanks
    10
    Thanked 1 Time in 1 Post
    Wait i GOT IT! Thanks!

  • #6
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,915
    Thanks
    15
    Thanked 227 Times in 227 Posts
    My suggestion would be to specify the entire http path in the @font-face code. Then there will be NO ambiguity.

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Quote Originally Posted by DrDOS View Post
    My suggestion would be to specify the entire http path in the @font-face code. Then there will be NO ambiguity.
    No, that won’t work in Firefox (at least it used to not work) because fonts can only come from the same domain and you can run into trouble if, for example, you have no proper redirection for www/no-www set up, since these are effectively two separate domains. It’s best to specify a relative path, or at least a domain independent absolute path.


  •  

    Posting Permissions

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