Hi All,
I am generating pdf file with given font. Pdf is generating well but font is not loading.
Below is my code please help me…
TCI Certificate <%= Rails.application.assets.find_asset('pdf.css').to_s.html_safe %>And css file is pdf.css
@font-face {
font-family: ‘BadScript-Regular’;
src: url(‘<%= Rails.root.join(‘app’, ‘assets’, ‘fonts’, “BadScript-Regular.eot?#iefix”) %>’) format(‘embedded-opentype’),
url(‘<%= Rails.root.join(‘app’, ‘assets’, ‘fonts’, “BadScript-Regular.woff”) %>’) format(‘woff’) ,
url(‘<%= Rails.root.join(‘app’, ‘assets’, ‘fonts’, “BadScript-Regular.ttf”) %>’) format(‘truetype’),
url(‘<%= Rails.root.join(‘app’, ‘assets’, ‘fonts’, “BadScript-Regular.svg#BadScript-Regular”) %>’) format(‘svg’) ;
font-weight: normal;
font-style: normal;
}
.txtName {
position:absolute; left:182px; top:500px; text-align:center; font-family: ‘BadScript-Regular’; font-size:50px;
width:437px;
height:79px;
}