Dear Customers! We're out of the office from the 6th of October to the 11th of October. We sincerely apologize for the inconvenience. For WordPress 5.5.* related issues, please visit this article

Okay
  Public Ticket #1970329
Change theme default fonts
Closed

Comments

  • Juliana started the conversation

    my company uses the cera pro font and I need help on how I can set up the theme to use this font

  •  361
    Filip replied

    Hello Juliana,

    So, first off, I suggest that you install and use the Engage Child theme (but I understand that you already have that ready?). It's the "engage-child.zip" file that is included in the theme's main package. Just upload it as a regular theme and activate it. After you do so, you can apply new CSS via Appearance / Theme Editor, without changing the parent theme's code. 

    That custom CSS would be:

    @font-face {    
        font-family: "MyFontName";    
        src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
    }
    body, p {     
        font-family: "MyFontName", sans-serif !important;
    }
    h1,h2,h3,h4,h5,h6 {    
        font-family: "MyFontName", sans-serif !important;
    }
    

    If you want the font to apply to regular text only, then remove the "h1,h2,h3..." part. If you want the new font to be applied to headings only, remove the "body..". You may also use two different font files:

    @font-face {    
        font-family: "MyFontName";    src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
    }
    @font-face {    
        font-family: "MyFontNameBold";    src: url(http://www.example.org/mycustomfont_bold.ttf) format("truetype");
    }
    body, p {     
        font-family: "MyFontName", sans-serif !important;
    }
    h1,h2,h3,h4,h5,h6 {    
        font-family: "MyFontNameBold", sans-serif !important;
    }

    There are unlimited variations. Of course, you need to have your font files hosted somewhere. If the file is not ttf (TrueType which is of the highest quality), then you may use WOFF, like:

    @font-face {    
        font-family: "MyFontName";    src: url(sansation_light.woff);
    }

    You may also try other font file formats but make sure they're compatible with modern browsers.smile.png

    Kind Regards,
    Veented Team