Why can't I use @font-face in my own CSS?

  • Author
    Posts
  • #975153

    peterroyal
    Member

    I want to use the CSS3 @font-face declaration but the url my CSS gets stripped out. This is a custom font that TypeKit does not offer.

    I enter:

    @font-face {
    font-family:’DeLarge’;
    src: url(‘http://example.com/fonts/DeLarge.eot’);
    }

    and the entire ‘src’ line is gone when I view the site.
    Blog url: http://triciaroyal.wordpress.com/

    The blog I need help with is triciaroyal.wordpress.com.

    #975253

    jackiedana
    Member

    Beyond the standard fonts in browsers, the only additional fonts available to WordPress.com blogs are those available through TypeKit.

    http://en.support.wordpress.com/custom-design/custom-fonts/

    #975300

    peterroyal
    Member

    but why? i understand the ease of typekit for many users, but if i know how to write a @font-face declaration, why can’t i use that to point to a font elsewhere on the web?

    #975329

    macmanx
    Staff

    It’s considered a security issue by our system as it could be used to force corrupt or infected font files on visitors.

    We are re-evaluation our security filters, so that might change, but for now TypeKit is the best way to change your fonts.

    #975354

    peterroyal
    Member

    Thanks for the explanation!

    #975359

    macmanx
    Staff

    You’re welcome!

The topic ‘Why can't I use @font-face in my own CSS?’ is closed to new replies.