Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #809709

    Hello Enfold – I would like to add a custom font ‘Average’ to Enfold.

    I have followed some steps in other threads, but they don’t work for me.
    What I already have is the css.
    @font-face {
    font-family: ‘averageregular’;
    src: url(‘average-regular-webfont.woff2’) format(‘woff2’),
    url(‘average-regular-webfont.woff’) format(‘woff’);
    font-weight: normal;
    font-style: normal;

    }

    I have put this into the “quick css” option of the Enfold Child theme.
    I have put the same code into the “customizer”, but both didn’t work.

    Can you help me out please?

    #809818

    if you can not find out the relative path to your fonts – use instead the absolute path to them. This is to keep out of harm’s way.

    and a good place for that @font-face rules maybe the style.css of your child-theme

    and a good place to upload could be wp-content/uploads/fonts/
    i would give each font-family an own folder to keep overview (f.e. for your font : the folder average) – so it could be:

    @font-face {
    font-family: ‘averageregular’;
    src: 	url(‘https://your.site.url/wp-content/uploads/fonts/average/average-regular-webfont.woff2’) format(‘woff2’),
    	url(‘https://your.site.url/wp-content/uploads/fonts/average/average-regular-webfont.woff’) format(‘woff’);
    font-weight: normal;
    font-style: normal;
    }


    if you have http you must modify the url

    • This reply was modified 7 years, 5 months ago by Guenni007.
    #810103

    Hi,

    Thanks for helping out @guenni007, did you try that out and did you have any luck with it @LodiPlanting?

    Best regards,
    Rikard

    #810610

    Thanks geunni007. I have followed all the steps, but the font still doesn’t show up in the fonts.
    Probably I do something wrong, but I have no clue what. Therefore I have added the login details.
    Can you have a look please?

    #810771

    Hi,

    Ok, thanks for the feedback. Could you try following this instead? http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/

    Best regards,
    Rikard

    #810827

    so if it is a google font this might be the best option – and i guess it would be nice to have the other web-font possibilities too: svg, eot, (for some cases ttf) on font squirrell there is a font generator – so if you got f.e. an otf as license you can make there all of these possiblities.

    btw for functions.php of your child-theme:
    because Average has no other font-weights the code is simple. Then you can use it in enfold options fonts the average font ( at the end of the list)

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

    Thanks guys. I will follow the thread! Consider this topic as closed!

    #810914

    Hi,

    Great, thanks for the feedback. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Add custom font 'Average' to Enfold theme’ is closed to new replies.