CSS and custom font: best practices.

Out of context: Reply #3

  • Started
  • Last post
  • 4 Responses
  • ETM0

    Here's an example of the markup I recently used on a project. Seems to work on near everything that will support custom fonts. Its not much different than what you'll see on the sites above. I had to play a lot with things like whether to use single quotes or double quotes etc.

    @font-face {
    font-family: 'LeagueGothicRegular';
    src: url(fonts/leaguegothic-webfont.e...
    src: url(fonts/leaguegothic-webfont.e... format('eot'),
    url(fonts/leaguegothic-webfont.w... format('woff'),
    url(fonts/leaguegothic-webfont.t... format('truetype'),
    url(fonts/leaguegothic-webfont.o... format('opentype'),
    url(fonts/leaguegothic-webfont.s... format('svg');
    font-weight: normal;
    font-style: normal;
    }

View thread