Embedded Khmer Unicode Font
With Mekhala or Firefox 3.5 you now can embed KhmerOS.ttf font in your website. This happens since the webkit team release new version of CSS3.
here is the way of doing it, let’s enjoy.
| @font-face { | |
| font-family: yourFontName ; | |
| src: url( /location/of/font/FontFileName.ttf ) format("truetype"); | |
| } | |
| /* Then use it like you would any other font */ | |
| .yourFontName { font-family: yourFontName , verdana, helvetica, sans-serif; | |
| } |
An example of some final, CSS3-valid code might look like this, for a cross-browser compliant embedded font:
Code:
| /* IE6/7/8 - Must be first */ | |
| @font-face { | |
| font-family: yourFontName ; | |
| src: url( /location/of/font/FontFileName.eot ); | |
| } | |
| /* FFx3.5/Safari/Op10 - Next */ | |
| @font-face { | |
| font-family: yourFontName ; | |
| src: url( /location/of/font/FontFileName.ttf ) format("truetype"); | |
| } | |
| /* THEN use like you would any other font */ | |
| .yourFontName { font-family: yourFontName , verdana, helvetica, sans-serif; | |
| } |
credit to http://randsco.com/index.php/2009/07/04/p680
