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
https://forums.phpfreaks.com/topic/219987-embedding-fonts/
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
https://forums.phpfreaks.com/topic/219987-embedding-fonts/#findComment-1140452
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.