Font not working in webpage 

Font not working in webpage 

  

Hello,

 i add font in resources open sans. also deploay action -> deploy to target and in target directory i put \fonts. 

below is css which i am using 

@font-face {
font-family: 'OpenSans';

 src: url('/fonts/OpenSans-Regular.eot');
 src: url('fonts/OpenSans-Regular.eot?iefix') format('eot'),
     url('fonts/OpenSans-Regular.woff') format('woff'),
     url('fonts/OpenSans-Regular.ttf') format('truetype');
    


    
font-weight: normal;
font-style: normal;
}

but in output my font is not looks like opensans.Plz help me to sort out this issue.


What do you mean by not working?


do you get errors in the devtools?


second, I see you set a relative path and a absolute-path, so that is a bit strange.


best way to make sure it's working url('/<espacename>/fonts/....')


Solution

J. wrote:hello sir,

thanks for ur reply.

i chnage path and its working. thank you.

What do you mean by not working?


do you get errors in the devtools?


second, I see you set a relative path and a absolute-path, so that is a bit strange.


best way to make sure it's working url('/<espacename>/fonts/....')




Solution

hello sir, i am using open sans font in webpage , font is reflecting but it does not match as per my zeplin file. i use same css . but font gets fade in webpage.

below is the css for the file.

font-family: 'Open-Sans';
  font-size: 20px;
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  line-height: 38px;
  text-align: center;
  letter-spacing: normal;
  color: #3a3a3a;

This is the difference from both text.