简体   繁体   中英

how to add a font in aspx page (css)

i have to add a regional language content on the site but the output shows as

²æà PÀApÃgÀªÀ ¸ÀÄÖrAiÉÆà ¤AiÀÄ«ÄvÀ,

where as i have imported the font in the css like this

@font-face {font-family: 'CoreIconsRegular';
src: url('fonts/coreicons-webfont.eot');
src: url('fonts/coreicons-webfont.eot?#iefix') format('embedded-opentype'),
     url('fonts/coreicons-webfont.woff') format('woff'),
     url('fonts/coreicons-webfont.ttf') format('truetype'),
     url('fonts/coreicons-webfont.svg#coreiconsregular') format('svg');
     font-family: "akshar";  
src: url(/akshar.eot); /* IE */  
src: local("The Real Font Name"), 
     url(/akshar.ttf) format("truetype"); /* non-IE */  
font-weight: normal;
font-style: normal;

}
* {
font-family: "akshar", Arial, Helvetica, sans-serif;
font-weight:400;
}

please help???

You have the Declaration syntax error in your CSS. Update your CSS like below.

@font-face {
  font-family: 'CoreIconsRegular';
  src: url('fonts/coreicons-webfont.eot');
  src: url('fonts/coreicons-webfont.eot?#iefix') format('embedded-opentype'),
       url('fonts/coreicons-webfont.woff') format('woff'),
       url('fonts/coreicons-webfont.ttf') format('truetype'),
       url('fonts/coreicons-webfont.svg#coreiconsregular') format('svg');
font-weight: normal;
font-style: normal;
}

@font-face {    
  font-family: "akshar";  
  src: url(/akshar.eot); /* IE */  
  src: local("The Real Font Name"), 
       url(/akshar.ttf) format("truetype"); /* non-IE */  
  font-weight: normal;
  font-style: normal;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM