ten1seven
5/23/2012 - 5:18 PM

How to use font weight with web fonts

How to use font weight with web fonts

@font-face {
	font-family: 'MyFont';
	src: url('path-to-normal-font');
	...
	font-weight: 400;
	font-style: normal;
}
@font-face {
	font-family: 'MyFont';
	src: url('path-to-bold-font');
	...
	font-weight: 700;
	font-style: normal;
}

body {
	font-family: MyFont, fallbackfont;
}

.normal-text {
	font-weight: 400;
}
.bold-text {
	font-weight: 700;
}