Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1178419

    Tim
    Participant

    Hi,
    I’ve installed a custom font, and I can’t get it to work. That said, it looks like it’s working in the sense that it’s changing the font. So, I’m pretty sure the code is working – it’s just not changing to the font that I installed – it looks like it’s adding a default font instead.

    I’ve read through numerous posts in the forum, and nothing I try seems to work. I must be overlooking something, so I was wondering if you could help?

    Here is what I’ve added to the Custom CSS in the customizer:

    @font-face {
    font-family: "King-Basil-Lite";
    src: url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot’);
    src: url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot?#iefix’) format('embedded-opentype'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.woff’) format('woff'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.ttf’) format('truetype'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.svg#svgKing-Basil-Lite’) format('svg');
    font-weight: normal;
    font-style: normal;
    }
    
    .h-custom-headline {
    font-family: 'King-Basil-Lite';
    }

    I’ve also attached a screenshot of my root directory so you can see the installation.

    Thanks,
    Tim

    #1178764

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Can you please provide us with a sample page URL on your site using the font. So that we can assist you further.

    Thanks!

    #1178909

    Tim
    Participant
    #1179123

    Lely
    Moderator

    Hello Timothy,

    You’re using pretty quotes on your font declaration. Please update this:

    @font-face {
    font-family: "King-Basil-Lite";
    src: url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot’);
    src: url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot?#iefix’) format('embedded-opentype'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.woff’) format('woff'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.ttf’) format('truetype'),
    url(‘http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.svg#svgKing-Basil-Lite’) format('svg');
    font-weight: normal;
    font-style: normal;
    }

    To this:

    @font-face {
    font-family: "King-Basil-Lite";
    src: url('http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot');
    src: url('http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.eot?#iefix') format('embedded-opentype'),
    url('http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.woff') format('woff'),
    url('http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.ttf') format('truetype'),
    url('http://da9.b9b.myftpupload.com/wp-content/themes/x-child/framework/fonts/King-Basil-Lite/King-Basil-Lite.svg#svgKing-Basil-Lite') format('svg');
    font-weight: normal;
    font-style: normal;
    }

    Hope this helps.