How To Embedded Font in css ( custom font )

In website font is most issues to design the site so, here I am show how to embedded you custom font output show in websites.
In css font embed to use @font-face attribute Given Below Example :

Here I am use php script you can select html file also but some time it problem to embedded than you use html 5 format to html file.
My font is store in font directory and my css file store in css directory.

Now Html File is Below :

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css"/>

<div class="demo-header">
<div class="title" align="center">My Text Is Here</div>

Css File is Below :

@font-face {

   /* font-family specify name of font that can use is css file */

   font-family: 'testMY';

   /* here you can specify font attribute than it apply automatically when you apply this font */

    font-style: normal;
   font-weight: 400;

   /* url is given that way and format must give */

   src: url("../font/Barbarian NS.ttf");


   box-shadow:0px 0px 3px 2px #999;
.demo-header .title
   font-family: testMY, Verdana, Arial, Helvetica, sans-serif;
   text-shadow: 0px 0px 2px #999999;

So, This way to Embed font. If you can have problem than give commet.


Popular posts from this blog

N Queen Problem using c and c++

Greedy Prim Algorithm using c/c++

m Coloring Problem using c or c++