-
AuthorPosts
-
April 26, 2016 at 8:30 pm #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,
April 29, 2016 at 1:21 pm #624367Hey Itai,
your font-weigt: 100; is working fine for me:
Please clear browser cache and hard refresh a few times.
Best regards,
AndyApril 29, 2016 at 1:51 pm #624415Hi 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,
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.
April 29, 2016 at 2:29 pm #624487Hi!
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!
VinayApril 29, 2016 at 2:37 pm #624503See 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
May 2, 2016 at 11:37 am #625659Hi,
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,
YigitMay 3, 2016 at 8:11 pm #626718Ok, 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 ;-) …
May 3, 2016 at 9:24 pm #626748So 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.
May 3, 2016 at 10:03 pm #626763Hey!
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 issueRegards,
BasilisMay 4, 2016 at 10:22 pm #627529Ok 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,
May 5, 2016 at 2:36 pm #627837Hi!
If you would like us to look further into it, please post WP admin logins and FTP logins here privately.
Regards,
YigitMay 10, 2016 at 4:32 pm #630062Thanks for following this up. I really appreciate the level of support!
Let me know if you need anything else.See my private comments below.
May 12, 2016 at 1:05 am #631048Hi,
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,
YigitMay 12, 2016 at 5:40 pm #631486Works !!! :-)
May 13, 2016 at 7:51 am #631882 -
AuthorPosts
- You must be logged in to reply to this topic.