Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #211871

    Hi,

    I’m wanting to use Raleway 400,500,600 weights:

    paragraph – raleway 500;
    h1 {
    font-family: ‘Raleway’, san serif;
    font-size: 20px;
    line-height: 23px;
    font-weight: 500;
    color: #a37908;
    }
    h2 {
    font-family: ‘Raleway’, san serif;
    font-size: 14px;
    line-height: 16px;
    font-weight: 600;
    color: #a37908;
    }

    I’ve added this into functions.php as above but not sure how to set the rest.

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Raleway’] = ‘Raleway:400,500,600’;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Raleway’] = ‘Raleway:400,500,600’;
    return $fonts;
    }

    Thanks!

    #212274

    Hi sineadh!

    After adding the code to functions.php file, you should be able to find Raleway font in fonts dropdown list in Enfold theme options under Styling tab. However, in your custom CSS code i see typo in font family. Please correct them as following

    font-family: 'Raleway', sans-serif;

    Regards,
    Yigit

    #212587

    Great.
    How do I add different font weights and text sizes to h1 & h2?
    I’d like
    h1 – Raleway 600, font size 20px
    h2 – Raleway 500, font size 14px

    thanks :)

    • This reply was modified 10 years, 10 months ago by sineadh.
    #212614

    Hi!

    You can use this:

    h1 {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 20px;
    }
    
    h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 14px;
    }

    Regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding different font weights to h1, h2 and paragraphs’ is closed to new replies.