Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #199586

    Hi!

    Sorry to ask this – I should know.

    How can I install a font into the theme. I want to install both a Google Web Font and a non-Google Font, i.e. Century Gothic.

    I guess I upload to a directory then change a style sheet somewhere….

    I can’t find direct instructions.

    Thanks very much!!

    #199628
    #200740

    Hey there!

    Thanks for that. It’s all making sense:

    1. I guess I need a clean copy of the font that has the correct .ttf or .otf extension

    2. I’m a bit unclear about the correct URL. It’s the beginning bit. If I’ve installed the font file via FTP among my WP files, should the URL start?

    http://www.mysite.com/wp-content/theme/etc….

    Thanks!

    #200833

    Hi again!

    I’ve tried with a couple of different fonts but I can’t seem to call them up.

    Here is my CSS:

    @font-face{
    font-family: ‘Arvo-Regular’;
    src:url(‘http://www.celadonsamui.com/wp-content/themes/enfold/fonts/Arvo-Regular.ttf’) format (“truetype”);
    }
    .h2 {font-family: ‘Arvo-Regular’;}

    I have uploaded the font file via ftp Transmit into a file called fonts in this location /wp-content/themes/enfold/fonts/Arvo-Regular.ttf

    Can you help? Is my url incorrect or my css?

    Thanks very much!

    #200908

    Hi!

    Arvo is a google font. You can actually add this on your functions.php to add the font:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Arvo'] = 'Arvo';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Arvo'] = 'Arvo';
    return $fonts;
    }

    Use this:

    h2 { font-family: ‘Arvo’, serif; }

    Cheers!
    Ismael

    #202324

    Oh hi Ismael!

    Thanks for the reply – I thought I’d sent another reply.

    I’m actually planning to use a non-google font. I was just trying Arvo as a random font test.

    Whichever font I upload I can’t get a result. Currently I’m trying Garamond:

    @font-face{
    font-family: ‘Garamond Premier Pro’;
    src:url(‘http://www.celadonsamui.com/wp-content/themes/enfold/fonts/GaramondPremrPro.otf’) format (“opentype”);
    }
    h2 {font-family: ‘Garamond Premier Pro’;}

    Is it my CSS or my URL that’s incorrect? I’ve uploaded the font file via Transmit into the Enfold theme folder. Must be doing something wrong.

    Thanks very much!!

    #202437

    Hey!

    Please use this on your custom.css or Quick CSS:

    @font-face{
    font-family: Garamond Premier Pro;
    src: url('http://www.celadonsamui.com/wp-content/themes/enfold/fonts/GaramondPremrPro.otf') format ('opentype');
    }
    
    h2 {font-family: Garamond Premier Pro;}

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How to install fonts’ is closed to new replies.