typeface.js
User / Developer Forum
CSS FONT WEIGHT
Neil
|
26 Feb 2010 14:28
Hi!

I'm a web designer and allow me to say... this is a GREAT tool!

I was wondering if you could help me with an issue I am having concerning the font-weight property. I'm working with a font that has 4 different weights :

http://www.gov.nu.ca/english/font/

When setting the CSS font-weight property to lighter, light or bolder the text was not rendering to the correct weight. This only seemed to work with normal and bold.

I then tried setting the css numeric values font-weight:300 through 900 without any luck.

I then looked up the "cssFontWeight" property in the font-name.typeface.js files and found the "cssFontWeight" had been set to "normal" for the heavier and lighter font weights. So I changed the value manually to light, lighter, and bolder, but had no luck. Then I tried setting the numeric values 300 through 900, but no luck.

I did find a workaround though! I changed the "familyName" property for each font weight

font-name-300
font-name-400
and so on...

I could then obtain the correct weights by changing the font-family.

Nonetheless, I might be missing something.

Any thoughts?

Cheers!
Neil

Post a Reply
YOUR NAME
YOUR COMMENT
We don't support HTML, but please use [quote] ... [/quote] tags around quotes.