Forums

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

Home Forums CSS Icon fonts with @font-face or/and @import

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #41752
    rodolpheb
    Participant

    Following Chris’s awesome tutorial I’m wondering which of these properties ( @font-face, @import) I should use.

    Thanks for your answers.

    #119828
    chrisburton
    Participant

    You have to use @font-face regardless if you have a separate stylesheet that you want to import.

    #119844
    rodolpheb
    Participant

    What do you think of the disadvantages of @import?

    #119846
    chrisburton
    Participant

    If the file is small enough to not effect the load time significantly of your site then I don’t see the disadvantage.

    #119849
    rodolpheb
    Participant

    So with @import I load the entire file even though I’d use one icon font ?
    With @font-face I can select the icon with font squirrel and gain performance ??

    #119850
    chrisburton
    Participant

    @import: imports files

    @import url(‘typography.css’);

    @font-face: loads the font which you can call by using the `font` or `font-family` property.

    Alternatively you can just paste the @font-face code into your main stylesheet.

    #119851
    rodolpheb
    Participant

    Thanks Chrisburton

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.