Page 1 of 1

Problem with variant: small-caps

PostPosted: Tue Mar 10, 2009 12:23 pm
by samdutton
I'm using the font Delicious via @font-face:

@font-face {
font-family: Delicious;
src: url(/fonts/Delicious-Roman.otf) format("opentype");
}

@font-face {
font-family: Delicious;
src: url(/fonts/Delicious-SmallCaps.otf) format("opentype");
font-variant: small-caps;
}

...

Problem is that the Delicious-SmallCaps declaration seems to override the Delicious-Roman declaration.

In other words, if I include the SmallCaps font declaration, and then use font-family: Delicious, text is displayed using Delicious-SmallCaps, not Delicious-Roman.

I've tested this in Safari and Firefox Minefield. I've tried adding font-variant: normal to the Delicious-Roman declaration, but this doesn't help.

Am I doing something wrong, or is this a bug?

Sam Dutton

Re: Problem with variant: small-caps

PostPosted: Tue Mar 10, 2009 6:23 pm
by Ralf Herrmann
font-variant is not supported yet, so it will always override the previously defined font.
See my wiki pages:
http://www.webfonts.info/wiki/index.php ... _in_Safari

You need to define a unique font family like
font-family: DeliciousCaps;

Ralf

Re: Problem with variant: small-caps

PostPosted: Tue Mar 10, 2009 6:35 pm
by samdutton
Thanks Ralf -- I'll try your workaround.

Sam