Can't fetch custom font



  • Hello, I'm having great difficulty rendering a custom font. I'm using phantom JS to render my report. when I render on chrome, it's working perfectly. But when I render through my server (using Phantom) none of the custom fonts are rendering.

    I've tried following all the instructions and troubleshooting. I'm not a programmer, so any help would be much appreciated. Thanks in advance and sorry if this doesn't follow guidelines. I'm stuck.

    Mike

    @font-face {
      font-family: 'cobaltaliensuperital';
      src: url('cobaltaliensuperital.woff');
      format('woff');
    }
    
    * {
        font-family: 'cobaltaliensuperital';
    }


  • Can you try to follow this tutorial?
    https://jsreport.net/blog/fonts-in-pdf

    Just out of curiosity. Why do you use phantom recipe?



  • Thanks for the quick reply. I went through the tutorial and it works in the studio, but when I run it on the server, the fonts just don’t show up. I’m only seeing the standard font. Are there any detailed instructions about how to get them up and running outside of the studio environment?

    Thanks again.
    Mike



  • Could you upload somewhere, or send us the export of your jsreport entities?
    https://jsreport.net/learn/import-export

    How do you call jsreport API? There should be no difference when calling from studio and when from the API.
    Please also share the jsreport and phantomjs versions.



  • Hey thanks for your help @jan_blaha I got it working. I had some other CSS conflicts that were creating issues.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.