News for hackers. Stuff that matters.
Re:Clear Sans by hndl on Tuesday March 04, 2014 @03:41PM (#7342953)
Can you elaborate what you mean by "load and reference each weight in your stylesheet" for us who aren't CSS savvy?
Re:Clear Sans by ryanwhitney on Tuesday March 04, 2014 @04:34PM (#7343338)
A separate font file is required for every style and weight of a typeface that you want to use. For example, to use four unique styles of a typeface on a site (say Regular, Italic, Bold, and Bold Italic), you would need to import four font files (ClearSans-Regular, ClearSans-Italic, ClearSans-Bold, ClearSans-BoldItalic).

If you give a chunk of type a style or weight that you haven't loaded the appropriate font file for, browsers will add weight to or slant the text themselves. ("faux-bold", "faux-italic"). This gives you ugly, rough, less readable text that counteracts the primary reasons to use a web font in the first place. Default CSS styles (H1 automatically adding font-weight: bold;) can also cause this in some cases. [See link]

There's two main (maybe three) approaches to implementing them correctly, Laura Franz does a good job of describing them here: http://coding.smashingmagazine.com/2013/02/14/setting-weight...

Re:Clear Sans by 8ig8 on Tuesday March 04, 2014 @03:43PM (#7342970)
Re:Clear Sans by elwell on Tuesday March 04, 2014 @03:46PM (#7342986)
the way most people do it is to use

  font-family: blah;
on every class that needs it. this is because @font-face isn't supported completely when using simply

  font-weight: blah;
to differentiate between different @font-face family groups.
Re:Clear Sans by calinet6 on Tuesday March 04, 2014 @11:08PM (#7345214)
If you define your weights correctly when loading your @font-faces, then weight works as expected: http://www.456bereastreet.com/archive/201012/font-face_tip_d...
Re:Clear Sans by elwell on Monday March 10, 2014 @05:14PM (#7375733)
That technique is actually what I'm referring to. I've seen that not work before; sorry don't have details. I just don't mess with that anymore and instead use every font-family explicitly when needed.