...
Code Block |
---|
@font-face { font-family: 'CustomIcons'; src: url('../fonts/CustomIcons.ttf'), url('../fonts/CustomIcons.eot'); } a.myLink-icon { font-family: 'CustomIcons'; } a.myLink-icon:before { content: "\e000"; /* The custom unicodeUnicode (aka. PUA) for the icon you want. */ color: #ED3820; /* Custom colour. */ } |
...
Code Block |
---|
@font-face { font-family: 'CustomIcons'; /*Specify the new font */ src: url('../fonts/CustomIcons.eot?#iefix') format('embedded-opentype'), /* IE8 fix. */ url('../fonts/CustomIcons.ttf'), url('../fonts/CustomIcons.eot'); } #contact_form { /* old icon image has been removed. */ font-family: 'CustomIcons'; /*the new font icon */ } #contact_form:before { content: "\e000"; /*the custom unicodeUnicode (aka. PUA) for the icon.*/ } |
...
Note | ||
---|---|---|
| ||
The unicode Unicode (or "PUA code") for the custom font can be found in the HTML and CSS file generated by Ico Moon. If the HTML and CSS files are unavailable, you can retrieve the unicode Unicode using one of the methods listed under the section "Dealing with the TTF Unicode" below. |
...
Dealing with the TTF Unicode
Ico Moon conveniently generates an HTML and CSS file for custom fonts which contain the Unicode to be used in your markup. However, in the scenario the original CSS or HTML files are unavailable, here are two ways to obtain the Unicode on Windows and Mac OS X 10.6+.
Obtaining Unicode in Windows
- Install the custom font (usually a right-click then select "Install" from the context menu).
- Run Character Map (done by searching the Start menu, or by typing Win+R then "charmap").
- Select the custom font from the Font drop-down menu. The glyphs in the custom font should now appear in the window.
- Select a character in the window. The Unicode will appear in the bottom-left corner in the status bar.