How to load the fonts locally?

Forums Forums SwiftThemes Support How to load the fonts locally?

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Pablo Mandado 5 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31117

    Pablo Mandado
    Participant

    <div class=”site-info”>Site url: http://workraw.com<br>Version:7.2.3</div>I have been trying to optimize my sites and they load very fast, with good scores, but I cannot get around the way to keep using the predefined typography of Swift theme while loading those fonts from my local server so I get rid of that external requests when loading my page (plus I can minify it, compress it and be on cache).

    Any suggestions? Maybe this could be integrated in future versions of Swift since the priority of the theme is speed? 😉

    Cheers,
    Pablo

    #31118

    Satish Gandham
    Keymaster

    Upload the fonts to your website via ftp or wordpress uploader and add this to user CSS
    Change the font url and the name accordingly.

    
    @font-face {
      				font-family: 'FontAwesome';
      				src: url('http://localhost/swift-dev/wp-content/themes/swift/css/fontawesome-full/fontawesome-webfont.eot');
      				src: url('http://localhost/swift-dev/wp-content/themes/swift/css/fontawesome-full/fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
      				url('http://localhost/swift-dev/wp-content/themes/swift/css/fontawesome-full/fontawesome-webfont.woff') format('woff'),
      				url('http://localhost/swift-dev/wp-content/themes/swift/css/fontawesome-full/fontawesome-webfont.ttf') format('truetype'),
      				url('http://localhost/swift-dev/wp-content/themes/swift/css/fontawesome-full/fontawesome-webfont.svg#fontawesomeregular') format('svg');
      				font-weight: normal;
      				font-style: normal;
    	}
    
    #31125

    Pablo Mandado
    Participant

    Thanks, I will give it a try. 😉

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.