Click here to Skip to main content
15,907,396 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I don't know what to do. I want to incorporate font so that i can use it offline. So, I tried linking like this. it didn't work at all.

What I have tried:

/* amatic-sc-regular - latin */
@font-face {
  font-family: 'Amatic SC';
  font-style: normal;
  font-weight: 400;
  src: url('../home/kohila/Desktop/adp/amatic-sc-v12-latin-regular.woff'); /* Modern Browsers */
  src: local('Amatic SC Regular'), local('AmaticSC-Regular');

}




.adp-top{position:absolute;width:100%;z-index:1;top:0;left: 0;}
.w3-bar{width:100%;overflow:hidden}
.adp-menuf{font-size:24px!important}
.adp-opacity,.adp-hover-opacity:hover{opacity:0.60}.adp-opacity-off,.adp-hover-opacity-off:hover{opacity:1}


.menu-bar{width:100%;overflow:hidden}
.menu-button:hover{color:#000!important;background-color:#ccc!important}
.menu-bar .menu-item{
color: white;
  font-family: 'Amatic SC';

text-decoration:none;

padding:8px 16px;
float:left;
width:auto;
border:none;
display:block;
outline:0}
.menu-bar .menu-button{white-space:normal}

.adp-black{color:#fff!important;background-color:#000!important}
Posted
Updated 2-Apr-19 23:14pm

 
Share this answer
 
Please check the path folder have that font or not.

If you inspect and check the console If folder not have that font it show error so you can identity folder have or have not font.

And you need to call types of font

@font-face {
  font-family: 'fontnameinfolder';
  src: url('fontnameinfolder.eot'); 
  src: url('fontnameinfolder.eot?#iefix') format('embedded-opentype'), 
       url('fontnameinfolder.woff2') format('woff2'),
       url('fontnameinfolder.woff') format('woff'),
       url('fontnameinfolder.ttf')  format('truetype'), 
       url('fontnameinfolder.svg#fontnameinfolder') format('svg'); 
}


If you get any one type font(ttf,eot etc..) you can able to convert all other format the font using lot online font convertor website in online.

Convert font put into folder all above types of font and call like above in css.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900