Jump to content

Lato font used from origin site server with cache controll


Qubabos

Recommended Posts

Hto to use Lato webfont avalaible in IPS 4.2 stock theme as local resource instead of loading this font from Google Webfonts ? 

Quote

Optionally choose a Google Web Font to use for body text. 'Default' uses whichever font face this theme defines in its stylesheet.

I want to use this font with custom theme and load to users from my server with cache control feature, allowing to store this font in users local cache.

Anyone ? 

Link to comment
Share on other sites

7 hours ago, Mark Round said:

For this you would have to upload the font to your server and then Reference the font face in your css , you would need the ttf wofff  svg and eot to do this and alias the license for the font if required. 

how to do this ?

Link to comment
Share on other sites

Ok, you need to upload the lato webfonts to your server in a location of your choice,then you need to add the following to your css.For this example i put the fonts in a folder called fonts and placed this on the server root.Once you have this css you can call on the font in any area of your site using any of the font family listed below.Let me know if you need any assistance with this.

/* Webfont: Lato-Black */@font-face {
    font-family: 'LatoWebBlack';
    src: url('http://mysite.com/fonts/Lato-Black.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Black.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Black.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Black.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Black.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-BlackItalic */@font-face {
    font-family: 'LatoWebBlack';
    src: url('http://mysite.com/fonts/Lato-BlackItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-BlackItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-BlackItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-BlackItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-BlackItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Bold */@font-face {
    font-family: 'LatoWebBold';
    src: url('http://mysite.com/fonts/Lato-Bold.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Bold.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Bold.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-BoldItalic */@font-face {
    font-family: 'LatoWebBold';
    src: url('http://mysite.com/fonts/Lato-BoldItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-BoldItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-BoldItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-BoldItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-BoldItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Hairline */@font-face {
    font-family: 'LatoWebHairline';
    src: url('http://mysite.com/fonts/Lato-Hairline.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Hairline.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Hairline.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Hairline.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Hairline.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-HairlineItalic */@font-face {
    font-family: 'LatoWebHairline';
    src: url('http://mysite.com/fonts/Lato-HairlineItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-HairlineItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-HairlineItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-HairlineItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-HairlineItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Heavy */@font-face {
    font-family: 'LatoWebHeavy';
    src: url('http://mysite.com/fonts/Lato-Heavy.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Heavy.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Heavy.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Heavy.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Heavy.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-HeavyItalic */@font-face {
    font-family: 'LatoWebHeavy';
    src: url('http://mysite.com/fonts/Lato-HeavyItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-HeavyItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-HeavyItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-HeavyItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-HeavyItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Italic */@font-face {
    font-family: 'LatoWeb';
    src: url('http://mysite.com/fonts/Lato-Italic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Italic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Italic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Italic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Light */@font-face {
    font-family: 'LatoWebLight';
    src: url('http://mysite.com/fonts/Lato-Light.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Light.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Light.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Light.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-LightItalic */@font-face {
    font-family: 'LatoWebLight';
    src: url('http://mysite.com/fonts/Lato-LightItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-LightItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-LightItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-LightItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-LightItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Medium */@font-face {
    font-family: 'LatoWebMedium';
    src: url('http://mysite.com/fonts/Lato-Medium.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Medium.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Medium.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Medium.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Medium.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-MediumItalic */@font-face {
    font-family: 'LatoWebMedium';
    src: url('http://mysite.com/fonts/Lato-MediumItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-MediumItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-MediumItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-MediumItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-MediumItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Regular */@font-face {
    font-family: 'LatoWeb';
    src: url('http://mysite.com/fonts/Lato-Regular.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Regular.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Semibold */@font-face {
    font-family: 'LatoWebSemibold';
    src: url('http://mysite.com/fonts/Lato-Semibold.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Semibold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Semibold.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Semibold.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Semibold.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-SemiboldItalic */@font-face {
    font-family: 'LatoWebSemibold';
    src: url('http://mysite.com/fonts/Lato-SemiboldItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-SemiboldItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-SemiboldItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-SemiboldItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-SemiboldItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-Thin */@font-face {
    font-family: 'LatoWebThin';
    src: url('http://mysite.com/fonts/Lato-Thin.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-Thin.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-Thin.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Thin.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-Thin.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

/* Webfont: Lato-ThinItalic */@font-face {
    font-family: 'LatoWebThin';
    src: url('http://mysite.com/fonts/Lato-ThinItalic.eot'); /* IE9 Compat Modes */
    src: url('http://mysite.com/fonts/Lato-ThinItalic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('http://mysite.com/fonts/Lato-ThinItalic.woff2') format('woff2'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-ThinItalic.woff') format('woff'), /* Modern Browsers */
         url('http://mysite.com/fonts/Lato-ThinItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: normal;
    text-rendering: optimizeLegibility;
}

 

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

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