Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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.

    #847477

    Hey 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,
    Mike

    #847480

    Thank you!

    #847481

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Lato font form local folder’ is closed to new replies.