Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #622512

    Hello,

    I’m trying to use the thin weight (100) variant of lato for my H1 but I can’t get it display with the correct weight on my pages. Be it in a text block or a special heading

    https://www.google.com/fonts/specimen/Lato#charset

    I have tried defining h1 in an external style sheet (enfold child) but none seem to work. They seem closer to the ‘normal’ 400 weight
    My definition is :
    h1 {
    font-family: “Lato”;
    font-weight: 100 !important;
    font-size: 36px;
    text-transform: none !important;
    }

    thanks,

    #624367

    Hey Itai,

    your font-weigt: 100; is working fine for me:

    View post on imgur.com

    Please clear browser cache and hard refresh a few times.

    Best regards,
    Andy

    #624415

    Hi Andy, thanks for the reply, but if you look at the screenshot on the test page, you can see that this what you have there is not 100.

    Look at the word ‘Goosebumps’ and the word ‘Google’ below. It’s definitely thinner,

    lato thin

    Here is a test I did with some inline style. As you can see there is no difference between the 100 & 400 weight.

    • This reply was modified 8 years, 7 months ago by Itai.
    #624487

    Hi!

    Your custom CSS is working correctly. As mentioned earlier I too see that the font weight is 100 please check attached screenshot . If you have any doubts please right click on the h1 and inspect it and scroll down a bit until you see the below css :)

    h1 {
        font-size: 48px!important;
        line-height: 65px!important;
        margin: 0px 0px 0.37em 0px;
        font-weight: 100!important;
        font-style: normal!important;
        font-family: "Lato"!important;
        color: #ffffff !important;
        text-transform: none !important;
    }

    Cheers!
    Vinay

    #624503

    See my example above. Type in 400 & 100 values, you will see that there is no difference. What you get is the 400 weight (on my end anyway).

    Sorry to be such a precision pain :-} but these little things do make a difference in the grander design.

    cheers,

    i

    #625659

    Hi,

    Please add following code to Functions.php file of your child theme in Appearance > Editor

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Lato'] = 'Lato:400,300,100';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Lato'] = 'Lato:400,300,100';
    return $fonts;
    }

    Best regards,
    Yigit

    #626718

    Ok, I pasted and saved into the functions doc. Unfortunately, I don’t see any difference. See the link below

    …I cleared the browser cache, etc ;-) …

    #626748

    So for some strange reason 2 hours later, I have lost all “Lato” styling on my site. Even when I put font-family:Lato inline in the HTML. WTF?

    I suspect it’s the new code I pasted in the functions file?

    See screengrab below.

    cheers,

    • This reply was modified 8 years, 7 months ago by Itai.
    #626763

    Hey!

    Have you gone to the font list, to try load the font from there?
    That is what the code Yigit provided does.
    Please let us know if it works or not, else provide us backend access, we will have to dig further to the issue

    Regards,
    Basilis

    #627529

    Ok so I have loaded the fonts from the font list and now it’s back to how it was: Lato Normal ie weight 400

    I guess we’ll just leave it at that but I don’t understand why my enfold child style.css has precedence over the font specified in that list.

    Thanks for your help,

    #627837

    Hi!

    If you would like us to look further into it, please post WP admin logins and FTP logins here privately.

    Regards,
    Yigit

    #630062

    Thanks for following this up. I really appreciate the level of support!
    Let me know if you need anything else.

    See my private comments below.

    #631048

    Hi,

    I added following code to functions.php file of your child theme in Appearance > Editor

    function wpdocs_theme_name_scripts() {
        wp_enqueue_style( 'Lato font', 'https://fonts.googleapis.com/css?family=Lato:400,100,300,700,900' );
    }
    add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

    Please review your website now

    Best regards,
    Yigit

    #631486

    Works !!! :-)

    #631882

    Hi,

    Great, glad we could help :-)

    Regards,
    Rikard

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