2

I tried the following to render a custom font in visual force

<apex:stylesheet value="https://fonts.googleapis.com/css?family=Actor"/>

.cal {
    font-family: 'Actor';
    font-size: 14px;
  }
  #content { font-family: Actor; !important }

This seems to work without the render as pdf. Is there a way to use custom fonts in the render as pdf. I also tried with fonts in the static recource but this didnt work eighter.

1
  • 1
    As far as I can tell, no, you can't use custom fonts in PDF mode. You're limited solely to the available fonts defined by the system. I'd love to be proven wrong, though.
    – sfdcfox
    Sep 13, 2017 at 23:55

1 Answer 1

2

Not possible.

Fonts Available When Using Visualforce PDF Rendering

Visualforce PDF rendering supports a limited set of fonts. To ensure that PDF output renders as you expect, use the supported font names.

For each typeface, the first font-family name listed is recommended.

Typeface            font-family Values
---------------------------------------
Arial Unicode MS    - Arial Unicode MS
---------------------------------------
Helvetica           - sans-serif
                    - SansSerif
                    - Dialog
---------------------------------------
Times               - serif
                    - Times
---------------------------------------
Courier             - monospace
                    - Courier
                    - Monospaced
                    - DialogInput

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .