Viewing 11 replies - 1 through 11 (of 11 total)
  • Theme Author Sami Keijonen

    (@samikeijonen)

    In the same way as in parent theme. Look theme functions.php for example.

    Use wp_enqueue_scripts in setup function and wp_enqueue_style-function.

    Thread Starter haije

    (@haije)

    Thanks a lot!

    Umm… Is there an easy way to replace the Oswald font with something else? I want to replace it with something that will work with my language, and Oswald doesn’t.

    Theme Author Sami Keijonen

    (@samikeijonen)

    Put this in your child theme style.css.

    h1, h2, h3, h4, h5, h6 {
    	font-family: Georgia,sans-serif;
    }

    You can set font-family like that.

    P.S. What is the language, which Oswald doesn’t support?

    All languages that use Cyrillic alphabet. Or, well, everything that is not Latin script, for that matter. ??

    Dropping Google fonts from the .css is easy, I wouldn’t even be asking. ?? What I’d like to do, however, is replace Oswald with something from Google fonts that actually does support Cyrillic.

    Any ideas?

    How about Cuprum? or perhaps Ubuntu Condensed?

    Theme Author Sami Keijonen

    (@samikeijonen)

    replace Oswald?

    You can do the same in your child theme functions.php as in Path theme functions.php. Look for wp_enqueue_script-hook. Here is premade child theme if needed.

    https://themehybrid.com/themes/path-child

    I’m sorry, Sami, but I’m just not good enough with php to even understand what you’re suggesting. I can work with css alright, I can work with html, but my understanding of php is almost nonexistent and I always need to see html behind it in order to mess around with it. Here I just don’t understand what to do. ?? What exactly should I add where in order to override the non-cyr webfont of the parent theme?

    As for the fonts, Andrew, the ones you list will do. But in order for them to work they must contain the Cyrillic subset. Otherwise they too won’t work.

    Theme Author Sami Keijonen

    (@samikeijonen)

    Like this in child theme functions.php inside setup function.

    /* Enqueue Google fonts */
    	add_action( 'wp_enqueue_scripts', 'path_child_google_fonts' );

    And this outside setup function.

    function path_child_google_fonts() {
    
    	wp_enqueue_style( 'font-oswald', 'https://fonts.googleapis.com/css?family=Oswald:400,300,700', false, 1.0, 'screen' );
    
    }

    >> As for the fonts, Andrew, the ones you list will do. But in order for them to work they must contain the Cyrillic subset. Otherwise they too won’t work.

    According to Google Web Fonts filtering tool, Cuprum supports Cyrillic, and Ubuntu Condensed supports both Cyrillic and Cyrillic Extended. I also tried to match the thickness, slant and width of my choice with the Oswald font.

    Thank you, Sami! It works! ??

    Yes, Andrew, Cuprum and Ubuntu Condensed support Cyrillic. However, for them to be useful they should include the Cyrillic subset when called: https://fonts.googleapis.com/css?family=Cuprum&subset=cyrillic Otherwise it won’t work, because Google will only load the Latin subset by default, even though the font family does have Cyrillic subset.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Google fonts?’ is closed to new replies.