Jump to content

how do i use google font locally?


sasiko

Recommended Posts

Posted

to allow further optimization i would like to upload font file to my own server instead of using from google server but how is it possible? ive already uploaded the fonts on my server but it wont display the font

 

<link href='http://mysite/fonts.cssfamily=Noto+Sans:400,700' rel='stylesheet' type='text/css'>

Posted

You can try:

1. Download fonts http://nscodes.com/files/fonts/NotoSans.zip

2. Create new folder ->fonts->NotoSans

3. Unzip NotoSans.zip and upload all font files to new created folder /fonts/NotoSans/

4. Add the following code to custom.css:

@font-face {
    font-family: 'noto_sansregular';
    src: url('/fonts/NotoSans/NotoSans-Regular-webfont.eot');
    src: url('/fonts/NotoSans/NotoSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('/fonts/NotoSans/NotoSans-Regular-webfont.woff') format('woff'),
         url('/fonts/NotoSans/NotoSans-Regular-webfont.ttf') format('truetype'),
         url('/fonts/NotoSans/NotoSans-Regular-webfont.svg#noto_sansregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

Font family code:

font-family: 'noto_sansregular', sans-serif

 Cheers

Posted

Plain and simple, you have to find a license and download for the font that you want so you can use it on your community/website. The CSS above from @Afternova then will allow you to use that font within your CSS.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...