"idea to media"

Friday, November 11, 2011

How to install the New fonts using CSS in web pages

Use this code.

@font-face {
  font-family: "Your typeface";
  src: url("type/filename.eot");
  src: local("☺"),
    url("type/filename.woff") format("woff"),
    url("type/filename.otf") format("opentype"),
    url("type/filename.svg#filename") format("svg");
  }

@font-face {
  font-family: "Your italic typeface";
  src: url("type/filename-ital.eot");
  src: local("☺"),
    url("type/filename-ital.woff") format("woff"),
    url("type/filename-ital.otf") format("opentype"),
    url("type/filename-ital.svg#filename-ital") format("svg");
  }
h2 { font-family: "Your typeface", Georgia, serif; }
h2 em { font-family: "Your italic typeface", Georgia, serif; }
em { font-style: italic; }



@font-face {
        font-family: 'MyFontFamily';
        src: url('myfont-webfont.eot?') format('eot'),
             url('myfont-webfont.woff') format('woff'),
             url('myfont-webfont.ttf')  format('truetype'),
             url('myfont-webfont.svg#svgFontName') format('svg');
}




@font-face {
font-family: Delicious;
src: url(Delicious-Roman.eot);
src: local('Delicious'), local(Delicious'),
url(Delicious-Roman.otf) format('opentype');
}

@font-face {
    font-family: 'Comfortaa Regular';
    src: url('Comfortaa.eot');
    src: local('Comfortaa Regular'),
         local('Comfortaa'),
         url('Comfortaa.ttf') format('truetype'),
         url('Comfortaa.svg#font') format('svg');
}

No comments:

Post a Comment