Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #923860

    Hello,

    I am trying to implement some custom fonts.

    I want to use two custom fonts, but using @font-face I added only one (it works), but second not working.

    Second font has woff, eot, otf, but not working. It looks like browser is trying to render, because it appears after short delay, but not properly rendered.
    I was trying to convert second font with font squirrel, but font is blacklisted, so I just downloaded all formats from the previous website of my customer via sftp, but font still not working.

    What I’ve made:

    fonts folder in enfold folder
    changed custom.css
    changed quick css

    tried to use all formats, only woff and woff2 – result is the same.

    Could you please help me to understand what is wrong?

    #923893

    Hey Serge,

    To upload the custom fonts manually and add them to frontend elements using CSS code please follow the below steps:

    1. Generate the webfont kit from fontsquirrel
    2. Extract The files and copy the @font css code from stylesheet.css to Enfold child theme styles.css

    @font-face {
        font-family: 'YOUR-FONT-NAME';
        src: url('YOUR-FONT-NAME.woff2') format('woff2'),
             url('YOUR-FONT-NAME.woff') format('woff');
        font-weight: normal;
        font-style: normal;
    }

    3. Copy the woff and other font files to the same folder as the child theme styles folder wp-content\themes\enfold-child

    4. Now you can start assigning new font family to headings and paragraph using custom CSS in your child theme styles or in the Quick CSS section
    NOTE: If the below code doesn’t change anything deactivate caching plugin and try adding “!important” to the font-family: ‘YOUR-FONT-NAME’!important;

    p {
     font-family: 'YOUR-FONT-NAME';
     font-size: 18px;
    }

    Another way to do this would be to use a plugin like Use any font which will make the job of assigning fonts very easy.

    Best regards,
    Vinay

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.