26 мая 2009, 18:01

CSS: CustomFont on page

Работает в браузерах с поддержкой custom-fonts в css3 (>FF3.1,IE8)
@font-face {
 	font-family: SomeFont;
	font-style: normal; 
	font-weight: normal;
	src:url("somefontnormal.otf") format('opentype');
	/*src:url("somefontnormal.ttf") format('truetype');*/
	* html src:url("somefontnormal.eot"); /* IE only eot font type */	
}
@font-face {
 	font-family: SomeFont;
	font-style: normal; 
	font-weight: bold;
	src:url("somefontbold.otf") format('opentype');
	/*src:url("somefontbold.ttf") format('truetype');*/
	* html src:url("somefontbold.eot"); /* IE only eot font type */
}
.element {
	font-family: SomeFont;
}
Если кому интересно, то расскажу о конвертировании ttf2otf, ttf2eot, otf2ttf




css   font

1 комментарий РСС

опытный
появился булет пруф, добавьте
Vitaliy Bogdanets
@font-face {
	font-family: 'MyFontFamily';
	src: url('myfont-webfont.eot#') format('eot'), 
	     url('myfont-webfont.woff') format('woff'), 
	     url('myfont-webfont.ttf')  format('truetype'),
	     url('myfont-webfont.svg#svgFontName') format('svg');
	}

Ваш комментарий

адрес не будет опубликован

ХТМЛ не работает


Ctrl + Enter