Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS @font-face integration

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32124
    dynamyc
    Member

    I want to integrate two different fonts using css @font-face, and first font to use for h1 and 2nd font for h2 for example. How I can do this?

    #53905
    TheDoc
    Member

    Use this tool: http://www.fontsquirrel.com/fontface/generator

    Declare them both:

    @font-face {
    font-family: 'Font1';
    src: url('fonts/Font1-webfont.eot?') format('eot'),
    url('fonts/Font1-webfont.woff') format('woff'),
    url('fonts/Font1-webfont.ttf') format('truetype'),
    url('fonts/Font1-webfont.svg#webfontdSscXrwb') format('svg');
    font-weight: normal;
    font-style: normal;
    }

    @font-face {
    font-family: 'Font2';
    src: url('fonts/Font2-webfont.eot?') format('eot'),
    url('fonts/Font2-webfont.woff') format('woff'),
    url('fonts/Font2-webfont.ttf') format('truetype'),
    url('fonts/Font2-webfont.svg#webfontdSscXrwb') format('svg');
    font-weight: normal;
    font-style: normal;
    }

    h1 { font-family: Font1; }

    h2 { font-family: Font2; }
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.