3

Which fonts are supported by HTML editor in salesforce and how can one add a new font?

1
3

A Rich Text Area field uses the Salesforce WYSIWYG HTML editor. This editor doesn't let you directly work with the HTML, but does allow you to define the style attribute. So if your browser can use the font, you should be fine.

You can copy the required HTML including the font requirements in the style then you can paste them into the WYSIWYG editor.

Alternatively, you can with directly with the field to define the font as required.

enter image description here


To the new question from the comments:

I am converting a html document to pdf using apex.So If I want to add a new font , how can I do it so converted pdf also displays text in same font.

Rendering to PDF is a much more restrictive operation.

See Supported fonts while redering Visual force page as PDF

Salesforce support 5 fonts when rendering Visualforce page to PDF.

Only the following four typefaces are used in PDF. Also, what you can use for font-family are on the right, mapped to the typefaces respectively, where sans-serif, monospace and serif are case insensitive.

  • Helvetica : Dialog, SansSerif or sans-serif
  • Courier : Courier, DialogInput, Monospaced or monospace
  • Times : Times, TimesRoman or serif (or any others inapplicable to the others would be mapped to this)
  • Arial Unicode MS : Arial Unicode MS

Snapshot of the source Knowledge Article from the wayback machine before the link was broken. It appears the full text from the source knowledge article was also published at https://trailblazers.salesforce.com/answers?id=90630000000hrLzAAI enter image description here

6
  • I am converting a html document to pdf using apex.So If I want to add a new font , how can I do it so converted pdf also displays text in same font.
    – Manuj
    Sep 23 '14 at 9:32
  • @Manuj I've extended my answer to include the restrictions in place for PDF rendering with Flying Saucer. Sep 23 '14 at 9:41
  • Which tool is on your screenshot? :) Sep 23 '14 at 9:41
  • 1
    @mast0r It is the FuseIT SFDC Explorer that my colleagues and I tinker with. It's part proof of concept and part development aid. Not really intended as a complete IDE, just a collection of useful bits and pieces put together over time. Sep 23 '14 at 9:45
  • Your link isn't related to the text you quoted. Where is the text you quoted from?
    – Andy Ray
    Aug 6 '20 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.