I want to create a special font containing only icons. and for each letter an icon will be displayed. I want to embed this font in css. and use it if I need an icon:
<a class="icon">f</a>
and css
<link href='http://fonts.mysite.com/css?family=MyFontWithIcons' rel='stylesheet' type='text/css'>
which contains:
@media screen {
@font-face {
font-family: 'MyFontWithIcons';
font-style: normal;
font-weight: normal;
src: local('MyFontWithIcons'), url('http://fonts.mysite.com/font?MyFontWithIcons') format('truetype');
}
}
and show badges with a badge class:
.icon {font-family: 'MyFontWithIcons'; }
And the letter "f" will be replaced by an icon inside the font, which is in place of the letter f. and css works with the font and replaces f with an icon inside the font. I think this is a good idea or not? The font file is smaller than many image icons. and also with this technique can i use diffirent font colors = diffirent icon colors? sizes etc. So is this a good idea or not?
source
share