Embed Gujarati font in website / Embed any other font in web page

Use following definition, which is pointing to a font file located on web server, and a class that has ‘font-family’ attribute with your custom defined font.

@font-face
{
font-family: “myguj-font”;
src: url(“Gujrati-Saral-1.ttf”) format(“truetype”);
font-weight: normal;
font-style: normal;
}
.myguj
{
font-family: “myguj-font”;
}

And your display area need just to point to a style class as follow:

<div class='myguj'>
This text will appear in Gujarati Font.
</div>

Find and download TTF, EOT, SVG, WOFF kind of font files and save in web folder, then you can refer via style sheet(css) file and embed any kind of font in your web page.

My personal website Siddharth Borania’s Personal Website

Advertisements