HOW to register a "bold italic" font

Posted by: rmoulin on 17 October 2019, 5:28 pm EST

  • Posted 17 October 2019, 5:28 pm EST

    When we export a PDF document, we use registerFont to provide the fonts.
    it works perfectly for "normal", "bold" and "italic" fonts but not for "bold italic" font.

    Do you know how we can do ?

    Tapez un message
  • Marked as Answer

    Replied 20 October 2019, 6:17 pm EST


    For bold italic font you need to register font with boldItalic property. Please refer to the following code snippet:
    var font = {
    normal: "base64 string of regular font",
    bold: "base64 string of bold font",
    italic: "base64 string of italic font",
    boldItalic: "base64 of bold italic font
    GC.Spread.Sheets.PDF.PDFFontsManager.registerFont("fontName", font);

  • Replied 21 October 2019, 1:29 am EST

    Thank you, it works.

    We have a problem with the Helvetica font, it does not register like other fonts.

    Do you have a solution ?

    best regard
  • Replied 21 October 2019, 4:36 pm EST

    We are glad to be able to help.

    Please let us know the exact issue you facing with the font? Also, could you share the font file with which you are facing the issue? If the font file is a private/paid font and you cannot share it on the public forum then you may create a case at our private support portal( and share the file.
  • Replied 22 October 2019, 7:49 pm EST

    Here the font.

    Best regards

  • Replied 22 October 2019, 7:50 pm EST
  • Replied 23 October 2019, 5:51 pm EST

    We are able to replicate the issue using the attached font file and hence we have forwarded it to the concerned team for further investigation of the issue. The internal tracking ID for the issue is SJS-2236. We will keep you posted with any updates regarding the same.
    Also, Helvetica is one of the standard/pre-defined fonts, so you don't need to register it again. Following is a list of all predefined fonts:
  • Replied 29 October 2019, 7:27 pm EST


    The dev team has confirmed that the .ttc font file is currently not supported by SpreadJS.As a workaround, you would have to convert .ttc to .ttf, you could get the online converter from google. For example this one:

  • Replied 25 November 2019, 6:16 pm EST


    Thanks for the answer, and the .otf font files are they supported ?

    Here is a font that does not work.

  • Replied 25 November 2019, 6:16 pm EST

    otf font
  • Replied 25 November 2019, 6:17 pm EST

    vonique 92.otf
  • Replied 26 November 2019, 7:15 pm EST


    SpreadJS supports .ttf and .otf fonts. Could you please share the font file for us to test?

  • Replied 26 November 2019, 9:41 pm EST


    vonique92.otf works now, we can close
  • Replied 27 November 2019, 3:36 pm EST

    Thank you for informing us about the same.
  • Replied 23 January 2020, 4:20 am EST

    My customers ask for a TTC support while they are using a lot of TTC on Mac. I tried to register the TTC font but it returns an error. I see in the pdfKit you're using that they support embedding of TTC fonts, is there any chance you support TTC in a near future?
  • Replied 23 January 2020, 6:03 pm EST


    I've added an enhancement request on your behalf to support TTC fonts. The internal tracking ID for the issue is SJS-3270. We will let you know about any updates regarding the same.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels