font-face

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Post Reply
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

font-face

Post by roedygr »

@font-face {
font-family: "Tiresias PCfont Z";
font-style: normal;
font-weight: bold;
src: local('Tiresias PCfont Z Bold') url("font/TIRESIAS PCFONTZ Bold.TTF") format("truetype");
}

The new version 17 is complaining about my font-face. The error message is a little too abstract. I wondered if there are some working examples somewhere. I suspect local fonts are no longer supported. My intent was to use Tiresias, but only if the user downloaded and installed it. I did not wan to slow things down for users who did not care about font.
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: font-face

Post by Albert Wiersch »

Hello,

The source of this error is a missing comma. It should be:

Code: Select all

src: local('Tiresias PCfont Z Bold'), url("font/TIRESIAS PCFONTZ Bold.TTF") format("truetype");
I've improved the error message. In the next update you should now see an error message like this, mentioning the possible missing comma:
This part of the value is invalid: "url("font/TIRESIAS PCFONTZ Bold.TTF") format("tru...(more)...". Is there a missing comma?
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply