-
AuthorPosts
-
September 3, 2017 at 10:32 pm #847465
Hello.
I have to use Lato 2.0 font (to get Cyrillic subset), so only option is to use it from local folder. I have Enfold child theme running. All CSS is located in theme options panel not in css style file.Can you help me to load lato from folder and make it available in theme? I need it only for Russian language. So how can I connect it to theme and force theme in RU (I have WPM) to use Lato in Cyrillic. I only need 100, 200, 300 and 400 weights.
Also, there is something strange about image captions. I have all fonts set to Lato (or for testing Arial) in theme settings, but img captions are using Georgia (default font). I can fix it anyway, but I have to get local fonts running.
Also, I have that code right now in my functions.php (to get latin-ext subset):
<?php function add_subset_func($fontlist) { $fontlist .= "&subset=latin,latin-ext,cyrillic"; return $fontlist; } add_filter('avf_google_fontlist', 'add_subset_func');
I need to set to use 200 weight on whole page (except strong and bold that is set to 400).
Thank you.
September 3, 2017 at 11:27 pm #847477Hey Maciej,
You will need to add the @font-face rules in the style.css of your child-theme. The function above won’t work with a self hosted font.
Look in your zip for latofonts.css, it has all of the @font-face rules to add to your style.css such as this:* Webfont: Lato-Black */@font-face { font-family: 'LatoWebBlack'; src: url('fonts/Lato-Black.eot'); /* IE9 Compat Modes */ src: url('fonts/Lato-Black.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */ url('fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */ url('fonts/Lato-Black.ttf') format('truetype'); font-style: normal; font-weight: normal; text-rendering: optimizeLegibility; }
You must use the absolute path to them.
You could use a plugin such as: https://wordpress.org/plugins/use-any-font/ instead.Best regards,
MikeSeptember 3, 2017 at 11:39 pm #847480Thank you!
September 3, 2017 at 11:40 pm #847481 -
AuthorPosts
- The topic ‘Lato font form local folder’ is closed to new replies.