font-face

Discussion about CSS related issues.
Post Reply
User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

font-face

Post by roedygr » Tue Jan 17, 2017 9:26 pm

@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
Site Admin
Posts: 3408
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: font-face

Post by Albert Wiersch » Wed Jan 18, 2017 11:32 am

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?
Image
Albert Wiersch

Post Reply