mardi 22 mars 2016

How to import a font into an Ember project

I am creating a website using the MEEN Stack (Mongo, Ember, Express, Node). And right now, I am trying to import the Lato font family into my project as that will be the font of everything on the website. I seem to be having trouble with this and can't find any resources online that cover this. Any ideas on how to do this? I've downloaded the Lato font and put the files in my public/assets/fonts folder and am still having problems. I am also using foundation if that helps.

I have this in my app.scss file:

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

nav {
    font-family: "LatoWebSemibold";
    background-color: none;
    width:150px;
    text-align:left;
    font-size:1em;
    list-style: none;
    margin: 0 0 0 0;
    padding: 0 20 30 20;
    float:left;
}




Aucun commentaire:

Enregistrer un commentaire