Is it possible to embed font files into html just like css?
Yes you can. You must convert your font to a BASE64 byte and embed with Data URI, like this:
@font-face {
font-family: 'yourfontname';
src: url(data:application/x-font-woff;charset=utf-8;base64,**your base64 here**) format('woff');
font-weight: normal;
font-style: normal;
}
You can use this site to convert your font to Base64: Base64 encoder
Yes, that's actually possible. You can embed the font as a base64 encoded font like this:
@font-face{
font-family: FontName;
src: url(data:font/ttf;base64,THESTRING… ) format('truetype');
}
But it's not advisable as the base64 string can get rather big and cause performance issues.