Importing Fonts

Homepage Community Forums Legacy Theme Support Importing Fonts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7972
    lisao
    Customer

      So I’ve imported my fonts from Google the way I always do, Here is the google font I’m using:
      @import url(http://fonts.googleapis.com/css?family=Muli:400,300,300italic,400italic);

      The font is importing but when I change the weight from font-weight: 300 to font-weight: 400 for say the body text or an h1, nothing happens. For some reason it isn’t acknowledging the weight. Now, I tried importing this same font to an older version of the Legacy theme and it worked just fine. This is the first time I’ve run into this issue.

      Do I have to take extra steps to import fonts now for some reason?

      Here’s our site in progress: http://originalginger.com/demos/yorkhr/about/

      #7973
      Wes
      Moderator

        In the new update I’ve added the default Oswald Google Font in the functions file. It should look like this –

        //* Enqueue Lato Google font
        add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' );
        function genesis_sample_google_fonts() {
        	wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Oswald:400,300|Open+Sans', array(), PARENT_THEME_VERSION );
        }<!--formatted-->

        You should still be able to add it to the stylesheet if you want though, both ways should work fine.

        #7974
        lisao
        Customer

          Unfortunately, for some reason you can no longer just use the @import css line for it to work. I had to go in and adjust your php to add the font I want. It’s now working. Thanks for the help!

          #7977
          Wes
          Moderator

            Oh I didn’t know that about the css. I’ll keep that in mind if it comes up again. Thanks for letting me know!

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