Jump to content

embedding fonts


unistake

Recommended Posts

Hi all,

 

I am trying to add three fonts to a website, they work however when checking on http://jigsaw.w3.org/ if the CSS is valid it comes up with:

 

Value Error : font-family Property font-family doesn't exist in CSS level 2.1 but exists in : "aspire" "aspire"

5 Property src doesn't exist : url('http://www.sweet-tea.co.uk/aspire.ttf') url('http://www.sweet-tea.co.uk/aspire.ttf')

8 Value Error : font-family Property font-family doesn't exist in CSS level 2.1 but exists in : dp dp

9 Property src doesn't exist : url('dp.ttf') url('dp.ttf')

12 Value Error : font-family Property font-family doesn't exist in CSS level 2.1 but exists in : braditc braditc

13 Property src doesn't exist : url('braditc.ttf') url('braditc.ttf')

 

Does anyone know why would not be validating?

 

Many thanks

 

The CSS code I have is:

 

@font-face {
    font-family: "aspire";
    src: url('http://www.sweet-tea.co.uk/aspire.ttf');
}
@font-face {
    font-family: dp;
    src: url('dp.ttf');
}
@font-face {
    font-family: braditc;
    src: url('braditc.ttf');
}

Link to comment
Share on other sites

Because it's not valid CSS 2.1. Sure it'll work, and it's quite valid, but @font-face has only really gained support in Firefox and Opera within the last few years. It's the same when doing things like border-radius, or -moz-border-radius and what not. Don't fret to much.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.