[Special Summer Sale] 40% OFF All Magento 2 Themes

Cart

Google Web Fonts

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10078
    sourav
    Participant

    I’m planning to use Google web fonts on my site.
    My site has lots of pages, but only a few CSS files.
    -=> Is there any way to add this tag in the CSS file (because I don’t want to edit all the HTML files)?

    <link href=' http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
    

    or do I need to add the above line in every HTML page’s head section?

    #10079
    zach-inglis
    Participant

    Add the tags, how? Please explain yourself better.

    In the HTML you can do this…

    <style type="text/css" media="screen">
      h1 { font-family: 'Droid Sans', arial, serif; }
    </style>
    

    If that’s what you’re asking?

    #10080
    dan-f
    Participant

    Yep, @import the google font in – jsfiddle example

    Put this at the top of your CSS file

    @import url('http://fonts.googleapis.com/css?family=Droid+Sans');
    

    Then, reference it like normal

    h1 { font-family: 'Droid Sans', arial, serif; font-size:24pt;}
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.